Ha! That backtick is the only reason most of my "scripts" are being written in Ruby instead of Python. :)
from subprocess import call
call(["ls", "-l"])
or import os
os.system("ls -l")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.
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.