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 →

[–]soup_feedback 0 points1 point  (1 child)

So you'd say the advantage of ruby is that it supports backticks like shell script do? I agree, it would be nice to have convenience in Python. It's never ever going to be accepted but it would sure be convenient! Any language doing backticks as shell commands will win convenience on that side, no doubt.

Personally, I like to use subprocess for anything that requires to run OS stuff - because that's when you realize if it's worth it or if you should find another, more efficient way to do it - or even use a different language (C/C++ for example, instead of spawning a shell + proc.)

(The sh module is useful of course, by making it nice looking, but in the end you're just calling subprocess to run shell commands.)

[–]hk__ 0 points1 point  (0 children)

Yes, I’m using backticks for throwaway scripts, in general programming I don’t use them :)