popen exit status
david
me at here.com
Mon Jan 28 11:32:45 EST 2002
More information about the Python-list mailing list
Mon Jan 28 11:32:45 EST 2002
- Previous message (by thread): popen exit status
- Next message (by thread): popen exit status
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
the documentation says that popen returns the error code, or 'None', of the
shell process. this code however always returns '1' even though the command
operates fine.
f=os.popen("ls /dev/loop*")
loopdevices = f.read()
if not f.close() == 'None': #fails on <>0: also
raise Exception, "couldn't find any loop devices."
- Previous message (by thread): popen exit status
- Next message (by thread): popen exit status
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list