os.system output

Andreas Jung andreas at andreas-jung.com
Wed Mar 21 17:13:59 EST 2001


----- Original Message ----- 
From: "Kalle Svensson" <kalle at gnupung.net>

> 
> Check out os.popen().
> 
> >>> dirs = os.popen("ls").read()

or commands.getstatusoutput() which is actually a wrapper around os.popen()

Andreas 
Digital Creations





More information about the Python-list mailing list