The version of python that I have is 2.2.2 and I can't upgrade, sorry.
As far as I know this only from version 2.4.2?? Johan Kent Johnson wrote: Johan Geldenhuys wrote:I've been musy with the os command on how to kill a process. That's been sorted out to an extend. Many thanks for your input.Now I have a question in the same direction: I use os.execpv(cmd, [cmd, args]). That executes the command that have output. This was the best way of getting the pid and killing the process after a certain time. How do I capture that output to a file? Can I use os.popen() or something like that after I did the os.execvp() execution or is there a standard way of putting any output in a file/Have you tried using subprocess.Popen()? It supports capturing output of the child process and it gives access to the pid of the child. Kent |
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor