simple command-line wrapper
Note: Work in Progress.
This lib aims to provide a Human friendly interface for subprocess.
If you need piped subprocesses, give envoy a try.
import shcmd with shcmd.cd("/tmp"): # get result directly assert shcmd.run("pwd") == "/tmp" # get streamed result packed in a generator streamed = shcmd.run("ls", stream=True) for filename in streamed.iter_lines(): print(filename) # get full stdout/stderr print(streamed.stdout) print(streamed.stderr)