Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One of the biggest downside is that the startup time for python is significantly slower than the shell. With just one script this isn't really noticeable, but if you're composing a lot of small scripts together, python becomes noticeably less responsive for interactive commands than bash.

Along similar lines bash's syntax is incredibly streamlined for composing standalone scripts and programs through pipes. A simple bash one-liner like the below would be much more awkward to write in python:

> diff <(netcat $server | grep town | sed 's/street/St' | cut -f 3 | head -n 5) <(cat ./$(psql $query).dat)



I wonder if that ‘lots of small scripts together’ is a desireble situation. Can’t it be just one app that performs all the steps?

It is all about context to me. A shell oneliner is not something I would replace with python but as soon as you start up an editor, think again I would say




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: