FAQ
Hello. Can anyone tell me how to get p.poll() or a workaound to work when
using popen3() on windows? I use python 2.3. I am trying to launch a
command window to execute a command and then check periodically to see if
the command has finished executing. If it has not finished after a given
amount of time, I want to close the process. Is this possible on windows?

p = win32pipe.popen3('command') will create the tuple of files p, but none
have a poll() attribute. p[1].read() will hang up if the command has not
finished. Any suggestions? The other alternative is that I use the above
to start the command and then use another os command to see if my process is
running in the background on windows. If it is, then perhaps I can close it
if it if need be.

Thanks.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedApr 28, '06 at 9:10p
activeApr 28, '06 at 9:10p
posts1
users1
websitepython.org

1 user in discussion

John: 1 post

People

Translate

site design / logo © 2022 Grokbase