3 ms·
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` me
by dmoreno 9y ago
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 https://pypi.python.org/pypi/sh/1.12.13
- therealmarv 9y agoyes, subprocess is a pain in the a. Thanks for the recommendation!
- helb 9y agoThat looks great, thanks! Related HN thread from almost 5 years ago: https://news.ycombinator.com/item?id=4530897 https://news.ycombinator.com/item?id=4530897
- annnnd 9y agoOk, 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.
- daenz 9y agoAuthor 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 http://amoffat.github.io/sh/sections/faq.html
- Tistron 9y agoThis looks super nice, does anybody know of something similar in js that is well made?
- plesn 9y agoI would kill to have this module in the batteries included…
- marcosdumay 9y agoThat's not Python, but well: http://www.haskellforall.com/2015/01/use-haskell-for-shell-scripting.html http://www.haskellforall.com/2015/01/use-haskell-for-shell-s...