[Tutor] Output of os.system("c:\myprog.exe") "piped" to a pyt
hon object ?
Tue, 10 Oct 2000 07:04:33 -1000
You don't indicate what platform you are running on. The answer is =
palatform dependant, but what you are looking for is popen() for "pipe
open". If you are on a Unix system it and its cousins, popen2() and
popen3() work reliably. On Windows there is a solution in the win32all
extensions by Mark Hammond. I don't have any experience with it, but =
that it is named similarly.
If you need it and don't have it win32all is available from:
> -----Original Message-----
> From: nicolas baurin [mailto:email@example.com]
> Sent: Tuesday, October 10, 2000 6:45 AM
> To: firstname.lastname@example.org
> Subject: [Tutor] Output of os.system("c:\myprog.exe") "piped" to a
> python object ?
> Hello to everybody,
> clearly i'm using os.system() to launch an external program=20
> ;i have to
> "redirect" what comes into the console (standard output of=20
> the external
> program) towards a python object: sys.stdout is not enough since =
> applying to the python interpretor...
> Merci d'avances et bonne soir=E9e,
> Nicolas Baurin
> Institut de Chimie Organique et Analytique, UPRES-A 6005
> Universit=E9 d'Orl=E9ans, BP 6759
> 45067 ORLEANS Cedex 2, France
> Tel: (33+) 2 38 49 45 77
> Tutor maillist - Tutor@python.org