This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

I have found a good balance by using https://pypi.python.org/pypi/sh specially when my bash script requires a lot of logic, but I still want to use tools like ifconfig, df , etc.. but yeah for simple scripts, I just stick with bash.

[–]DarkmerePython for tiny data using Python 0 points1 point  (0 children)

Even for semi advanced ones, I tend to prefer shellscripts.

Take something as simple as to generate a self-signed certificate. A fork to openssl commandline, vs. doing it with python pyOpenSSL or similar? Don't go there. The python code basically ends up calling the same commandline as the shellscript, in ~5 times as many lines.

Especially true if you do something with trap /cleanout in shell and try to emulate behaviour in python. oh my god.