473,387 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

popen3 on windows

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.
Apr 28 '06 #1
0 1149

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rajarshi Guha | last post by:
Hi, I have some code that runs an interactive program via popen3(). The program generates output which is then used later on. My script looks like this: o,i,e =...
4
by: Chris Green | last post by:
Hey folks, I'm whipping up a quick CGI to wrap a command line app and I was a bit suprised to not find a execl-like Popen3 style object. I don't want to bother with the shell interpreting...
1
by: | last post by:
This could possibly be a bug, but I don't understand it fully so I'm posting here first. Searching the list told me other people are having this problem too. I have created a class which...
1
by: Ruchika | last post by:
Hi, I want to build an embedded Visual C++ project from the python script. This is what I do - evc = r'"C:\Program Files\Microsoft eMbedded C++ 4.0\Common\EVC\Bin\EVC.EXE"' proj =...
13
by: Russell E. Owen | last post by:
I'm trying to launch an application from Python 2.3 on Windows. The application is "ds9" (an image viewer), and is installed in C:\Program Files\ds9\ds9 On unix I just do: os.popen3("ds9") and...
2
by: Jakob Simon-Gaarde | last post by:
Follow-up on a thread from 1999 (see below) Well now it is 2005 and the operating system I'm using is Windows Server 2003, and I can still see that the same problem persists with: ...
2
by: Jeffrey Barish | last post by:
I have an application that has been working fine on Linux, but now I need to port it to Windows XP. The program uses Popen3 to run another program. I use Popen3 so that I can access the pid...
2
by: Pierre Rouleau | last post by:
Hi all, I have a consistent test case where os.popen3() hangs in Windows. The system hangs when retrieving the lines from the child process stdout. I know there were several reports related to...
0
by: Jonathan Mark | last post by:
hi all... I wrote a seemingly simple function (below) to use Popen3() and select() to run a program and capture its exit status, stdout output, and stderr output. It worked fine until the box...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.