os.popen3 with windows; help?

Russell E. Owen rowen at cesmail.net
Wed Oct 27 13:38:07 EDT 2004


In article <rowen-E1A6D6.10270727102004 at gnus01.u.washington.edu>,
 "Russell E. Owen" <rowen at cesmail.net> wrote:

>One more question:
>- I noticed that when I use os.popen3 to open ds9, i have to keep the 
>returned reference to stdout around as long as ds9 itself is open or 
>Python hangs. I can't close it. I can't lose the reference and allow it 
>to be garbage-collected. Any suggestions for avoiding this? (At least it 
>doesn't prevent Python from shutting down when requested.)
>
>I had been using os.spawn... to launch ds9, but spawn is not supported 
>on Windows, alas. I communicate with ds9 via xpa, so the pipes returned 
>by popen3 are of no interest.

Sorry, that was a stupid question. I had been using spawnlp and hadn't 
noticed the little footnote in the docs about the spawn variants that 
aren't supported under Windows. All I have to do is switch to a version 
of spawn that IS cross-platform.

So. Case closed. Thanks again for everybody's help!

-- Russell



More information about the Python-list mailing list