popen child termination
jepler at unpythonic.net
Sat Aug 21 15:12:50 CEST 2004
Why are you using popen instead of system? Is it to discard the output
from the program? If so, your best choice would be to use shell
redirection in system(). system() already waits for the child to exit.
If you really want to use popen, the class-based interface (Popen3,
Popen4) will give you an object with a pid attribute and wait() and
poll() methods to check for exiting.
BUT your real problem is that os.remove doesn't expand paths. Use
os.path.exists("~") -> 0
os.path.exists(os.path.expanduser("~")) -> 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: not available
More information about the Python-list