python spawn new process, rout stdin/out

kmkz89 at gmail.com kmkz89 at gmail.com
Thu Feb 9 17:12:57 EST 2006


Hi,

I'm trying to make a program that acts as an intermediate between the
user and another executable. When my python program is executed, I
would like another .exe to be spawned within the python program, and
the stdin/stdout to be routed from the user to the program. So if my
program is booted into a console window, anything typed by the user
will be passed to the subprocess and any output from that executable
will appear in the console, showing the user what happened. In
addition, when the python program is closed, the subprocess should be
closed.

Any ideas how to do this? I am far from a Python newbie but I know
little to nothing about os.*/subprocess.* so I need quite a bit of
assistance.

Thanks guys!
kmkz




More information about the Python-list mailing list