Hacker News new | ask | show | jobs
by jquast 3860 days ago
> As much as I really like python, I find that calling system commands is a pain.. calling os.system is obviously far from great, and calling subprocess can get cumbersome.

Have a look at the 'sh' python module to ease your pain: http://pypi.python.org/pypi/sh

2 comments

I think having to use/install something is precisely the pain people are talking about.
Especially for the kind of glue scripts we're talking about, having to install new language packages across a heterogeneous environment consisting of thousands of boxes is not an easy option.

For me the greatest advantage of the Perl5/shell integration is that you can use Perl's sane data structures, flow control, and code organization features instead of their bash equivalents which have endless pitfalls and can be less portable than basic Perl5.

That's useful, thanks.