10 ms·
> Trying to use Python or Go to whack some external commands together feels very cumbersome to me. Try https://amoffat.github.io/sh/ https://amoffat.github.io/
by andrewshadura 6y ago
> Trying to use Python or Go to whack some external commands together feels very cumbersome to me.
Try https://amoffat.github.io/sh/ https://amoffat.github.io/sh/
from sh.contrib import git
git.reset(hard=True)
- maddyboo 6y agoWow that’s cool. Thanks for sharing.
- PhantomGremlin 6y agoHow is this better than just using subprocess? Faster? More elegant? The doc says: sh is a full-fledged subprocess replacement It would be nice if that page had some sort of comparison. I guess the examples shown are sufficient if you're a regular user of subprocess?