Re:Help Message for Shell Scripts
by argonauts12 on Thursday July 09, 2020 @12:30AM
(#23776947)
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/
It's essentially an abstraction layer above subprocess. Quick example - to use ifconfig natively in python:
from sh import ifconfig print(ifconfig("wlan0"))