Interactive programs through Popen3
Joe Smith
JoeSmith at bogusaddress.com
Sun Feb 20 04:56:34 EST 2000
I take it that you must be running on UNIX. If I remember correctly, 1.5.2
says something about can't fork on Windows NT 4.0. If I remember correctly,
popen2() and popen3() also have the same problem. The doc should probably
state that the popen2 module/library does not work on NT. It would probably
not be difficult to fix these so that they work right on windows NT, but since
I figured a way around the problem, I don't feel inspired.
Z Three Penguin wrote:
> When I try to run an interactive program (such as pico), reading the file
> object hangs the interpreter. The code is:
>
> import popen2
> s=popen2.Popen3("pico")
> while s.poll()==-1:
> print s.fromchild.read()
> a=raw_input()
> s.inchild.write(a)
>
> Any ideas?
>
> --
> -Z3Penguin
>
> ------
> Z3Penguin Z3Penguin at PenguinPowered.Com
> http://whitecow.peji.com/
>
> Just because you're paranoid, it doesn't mean they're not after you.
> Communication is Human, Encryption is Divine
> Linux. The choice of a GNU generation.
> Dr. Pepper and doughnuts... because breakfast is the most important meal of
> the day.
>
> ~
> . .
> /V\ got linux?
> // \\
> /( )\
> ^`~'^
>
> PGP Fingerprint: A757 001D 58E3 1486 6466 BE35 4E28 A328 90CF 4E88
> Obtain my PGP key from: http://whitecow.peji.com/key.asc
More information about the Python-list
mailing list