Seems pretty easy in python:
from subprocess import call
call(["ls", "-l"])
or import os
os.system("ls -l") from subprocess import call
call(["ls", "-l"])
or import os
os.system("ls -l")Compare
from subprocess import call
call(["ls", "-l"])
to `ls -l` for listing in ls('-l'):
'''etc'''
Here's the library in question - https://pypi.python.org/pypi/pbs - it makes me super happy to do shell work in python.Also, when using Popen, calling .wait() can cause problems if you are expecting large amounts of info back from stdin or stderr. Using .communicate() is generally better.