Re: [Tutor] Python 2.2... os.exec catch stdout

2009-06-05 Thread ALAN GAULD
If vim is just an unfortunate example then it might be possible but I think we need to know a bit more about what exactly you are trying to do. > It's actually a stand alone program; which opens up a $EDITOR; an > then prints to stdout the results of some db munging. ... > what I'm wanting to g

Re: [Tutor] Python 2.2... os.exec catch stdout

2009-06-05 Thread Alan Gauld
"Chris Mueller" wrote This would be simple; if I did not need to interact with my sub-program. I currently have.. pid = os.fork() if not pid: os.execvp(program, (program,) + tuple(arguments)) os.wait()[0] This works fine; lets me interact with "vim" fine; and return to the python script

Re: [Tutor] Python 2.2... os.exec catch stdout

2009-06-04 Thread Lie Ryan
Chris Mueller wrote: > /Hello. > > I am relegated to running python 2.2; so I do not have access to subprocess. > > In my script; at one point, I need to run a program; interact with the > program; exit the program; and parse the output printed to stdout. > > This would be simple; if I did not

Re: [Tutor] Python 2.2... os.exec catch stdout

2009-06-04 Thread Emile van Sebille
On 6/4/2009 1:49 PM Chris Mueller said... /Hello. I am relegated to running python 2.2; so I do not have access to subprocess. In my script; at one point, I need to run a program; interact with the program; exit the program; and parse the output printed to stdout. This would be simple; if I

[Tutor] Python 2.2... os.exec catch stdout

2009-06-04 Thread Chris Mueller
*Hello. I am relegated to running python 2.2; so I do not have access to subprocess. In my script; at one point, I need to run a program; interact with the program; exit the program; and parse the output printed to stdout. This would be simple; if I did not need to interact with my sub-program.