Hi,
I want to know how to do this:
I have an executable file, which reads input from stdin provided
output at stdout or stderr.
I have to run it for a specific period of time (say 5 secs), get the
output and display it.
If i use popen(), this way:
from subprocess import *
p = Popen(["test","<test.in"," >test.out"], shell=True) 
p.wait()
print p.stdin,p.stdout
I dont get output in p.stdout.Apart from this, can u say how to stop
this subprocess after 5 secs (or whatever time frame specified)?
signal SIGALRM may not work (as i want it to work in windows & unix).
-Varun
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to