Re: popen e pclose on python 2.3 question

2007-06-12 Thread Flyzone
> i need to kill the child if the program take more than 300 ms, but i > need also to wait this 300 ms to have the reply. I reply by myself: from popen2 import Popen3 cmd = Popen3('command','r') waiting=0 while (cmd.poll()==-1): time.sleep(0.1) waiting+=1 if (waiting>3): os.k

popen e pclose on python 2.3 question

2007-06-12 Thread Flyzone
I need to run a network program and return output in a variable name without use temporany file. So i tought to use popen (i'm using python 2.3, i can't upgrade). RESULT = os.popen('command'+HOST, 'r') I have a problem about it: i need to kill the child if the program take more than 300 ms, but i n