Re: os.popen vs os.system

2005-05-17 Thread rbt
Peter Hansen wrote: > I don't think there's any significant difference between the above > (assuming you add in the missing quotation marks) and > os.system('shutdown -r -f'), except that the os.system() approach is > shorter and more readable if you are simply discarding or printing the > outp

Re: os.popen vs os.system

2005-05-17 Thread rbt
Peter Hansen wrote: > You can't be doing exactly that, since there are no sockets involved... > do you mean the above call is executed -- on the receiving end -- after > some signal is received via a socket in another part of the code? That's > not going to have any effect on things... Here's t

Re: os.popen vs os.system

2005-05-17 Thread rbt
Peter Hansen wrote: > You can't be doing exactly that, since there are no sockets involved... > do you mean the above call is executed -- on the receiving end -- after > some signal is received via a socket in another part of the code? That's > not going to have any effect on things... > Here

Re: os.popen vs os.system

2005-05-17 Thread F. Petitjean
Le Tue, 17 May 2005 13:50:08 -0400, rbt a écrit : > Is it more appropriate to use os.popen or os.system on a windows XP > client? Nope. use the subprocess module :-) Microsoft had the great idea to embed white space inside a lot of directories (compare C:\Program Files\ to /usr/bin ) which mean

Re: os.popen vs os.system

2005-05-17 Thread Peter Hansen
rbt wrote: > 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() I don't think there's any significant difference between the a