control of child process stdio

Gerrit Holl gerrit.holl at pobox.com
Wed Feb 16 15:48:31 EST 2000


Frédéric van der Plancke wrote on 950722460:
> How to write a Python script that controls execution of console
> Windows/Unix programs (.exe), writing to / reading from them using
> their stdin/stdout ?
> 
> (For my current problem simplified assumptions hold: the master script
> should spawn the program, send fixed-length data to it, wait for at
> most a given time, read fixed-length data from the program, then the
> program ends itself.
> This will be done several times in sequence.)
> 
> More-or-less platform-independent solutions are preferred, but I mainly
> need a Windows solution...

You need the os.popen function.

regards,
Gerrit.

-- 
cat: /home/gerrit/.signature: No such file or directory




More information about the Python-list mailing list