Re:When Bash scripts bite
by dmoreno on Friday May 12, 2017 @03:58AM
(#14322178)
I was just thinking how cool would it be to have a module in python to really ease generating bash style scripts, with less overhead than normal `subprocess` methods have... And there was it just a Google search away: https://pypi.python.org/pypi/sh/1.12.13
[ Parent
| on HN ]
Ok, looks great, but... I wonder what "gotchas" this module (and Plumbum) has? Does anyone use this in production?
EDIT: just learned that PBS is now sh.py, so I removed it from the comment.
Author of sh.py here. It seems to be used by many people in production around the world. I've actively maintained it since 2011, and it supports python 2.6-3.6, inclusive. Most of the gotchas have been worked out by now, but the FAQ covers the most common stumbling blocks: http://amoffat.github.io/sh/sections/faq.html
Thank you! Can I suggest that you link to documentation from your pypy page? Nice work btw.
Yes please do that. I failed to find the documentation when I had a brief click around earlier today. (Mind I wasn't trying very hard.)
Re:When Bash scripts bite
by marcosdumay on Friday May 12, 2017 @11:16AM
(#14324713)
That's not Python, but well:
http://www.haskellforall.com/2015/01/use-haskell-for-shell-s...
This looks super nice, does anybody know of something similar in js that is well made?
That looks great, thanks!
Related HN thread from almost 5 years ago: https://news.ycombinator.com/item?id=4530897
I would kill to have this module in the batteries included…
Re:When Bash scripts bite
by therealmarv on Friday May 12, 2017 @04:05AM
(#14322198)
yes, subprocess is a pain in the a. Thanks for the recommendation!