popen3 child_stdin

Zac Jensen listbox at cybereal.org
Sun Jun 15 17:50:24 EDT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 15 June 2003 03:32 pm, ddoc wrote:
> popen3(cmd[, mode[, bufsize]]) Executes cmd as a sub-process. Returns the
> file objects (child_stdin, child_stdout, child_stderr). Availability: Unix,
> Windows. New in version 2.0.
>
>
> I may be having a moment of brain fade, but I can't see how I get hold of
> child_stdin etc, having started up a DOS program with popen3
>
> Help?

c_stdin, c_stdout, c_stderr = popen3("C:\command.com")

c_stdout.write("dir\nexit\n")

print c_stdin.read()


...

not tested

...

or ... something... have fun, hth

- -Zac

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+7OogV3L7YsSif1URAhCZAJ0V3O008PacCB5QDO9zAllq39NDYgCffInj
6ZKNYQmwcLd7QCzER72nxWs=
=r6U2
-----END PGP SIGNATURE-----






More information about the Python-list mailing list