News for hackers. Stuff that matters.

argonauts12

Re:Help Message for Shell Scripts 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"))