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