2 ms·
I've been migrating shell scripts to python and have found the 'sh' library invaluable for pulling in pure CLI commands from the bash script and adding to the
by argonauts12 6y ago
I've been migrating shell scripts to python and have found the 'sh' library invaluable for pulling in pure CLI commands from the bash script and adding to the python implementation. http://amoffat.github.io/sh/ http://amoffat.github.io/sh/
It's essentially an abstraction layer above subprocess. Quick example - to use ifconfig natively in python:
from sh import ifconfig print(ifconfig("wlan0"))