os.popen2
Curtis Jensen
cjensen at bioeng.ucsd.edu
Wed Feb 7 12:39:19 EST 2001
Venkatesh Prasad Ranganath wrote:
>
> Hi,
>
> The following code stalls
>
> import os
> i = os.popen2("/bin/bash")
> i[0].write("ls -lR")
> i[1].read()
> -----------stalls here
>
> Am I missing something the way it should behave or isn't it possible to execute
> a process using popenX, keep it alive and interact with it?
>
> waiting for reply,
>
> --
> Venkatesh Prasad Ranganath
just a guess, try putting a carrage return at the end.
i[0].write("ls -lR\n")
--
Curtis Jensen
cjensen at bioeng.ucsd.edu
http://www-bioeng.ucsd.edu/~cjensen/
FAX (425) 740-1451
More information about the Python-list
mailing list