os.popen vs os.system

rbt rbt at athop1.ath.vt.edu
Tue May 17 13:50:08 EDT 2005


Is it more appropriate to use os.popen or os.system on a windows XP 
client? I'm calling the operting system's shutdown function like this:

restart = os.popen(shutdown -r -f)
print restart.read()
restart.close()

If it matters, I'm doing this remotely over sockets.



More information about the Python-list mailing list