Re: [Tutor] Time Controlled Execution

2005-02-21 Thread Mike Bell
On Windows it looks like msvcrt will give you a non-blocking terminal read -- on mac / *nix systems it looks a little trickier: http://mail.python.org/pipermail/pythonmac-sig/2004-February/010140.html The os module in windows doesn't even have O_NONBLOCK. That seems like trouble. m On Sun, 20

Re: [Tutor] Time Controlled Execution

2005-02-21 Thread Pierre Barbier de Reuille
I really don't think you can have a common way to do this on both systems. First, the way to kill a process is quite different on both systems (the os.kill function works only on UNIX systems, and I don't know is there is such a function available in Python for MS Windows). Then, I really doubt

[Tutor] Time Controlled Execution

2005-02-20 Thread Varun Soundararajan
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.ou