exception popen2

mike mike_lg_t at yahoo.com
Sun Feb 24 22:54:23 EST 2002


Hi:

I am trying to catch the exception from popen2

try:
  child_in.child_out=os.popen2("python dth.py")
except OSError:
  print "can not open file"

dth.py does not exist
but when i try to run this script. the message "can not open file" does not
display.
which exception I should catch?


best Regards

zhengyi





More information about the Python-list mailing list