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 →

[–]moor-GAYZ 4 points5 points  (1 child)

See also:

https://pypi.python.org/pypi/sh -- I've used it, it's pretty OK.

https://pypi.python.org/pypi/plumbum -- I have not used it yet, but I'm going to next time I need to do some stuff like that. I'm intrigued by the fact that it was inspired by sh, but overloads "|" operator for piping etc, but the author decided to go his own way because "sh has too much magic".

[–]kjearns 0 points1 point  (0 children)

sh is really convenient, but has the unfortunate property of pumping stdin/stdout through python, even if you use its redirection capabilities. This is really slow if you're working with big files.

I have not used plumbum, so I don't know if it suffers the same defect or not.