John Mechaniks wrote:

> from subprocess import call
> call(['ls', '-l'])
> 
> How do I get the result (not the exit status of the command) of "ls -
> l" into a variable?

output = subprocess.Popen(["ls", "-l"], stdout=subprocess.PIPE).stdout.read()

Peter
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to