3 ms·
A little bit of python that makes it easier to do shell-style scripting. def call(cmd): args = shlex.split(str(cmd)) p = Popen(args, stdout=PIPE, stderr=
by ramidarigaz 15y ago
A little bit of python that makes it easier to do shell-style scripting.
def call(cmd):
args = shlex.split(str(cmd))
p = Popen(args, stdout=PIPE, stderr=PIPE)
text = p.stdout.read()
if not text:
text = p.stderr.read()
return text