Interactive programs through Popen3

Z Three Penguin z3penguin at z3penguin.com
Sat Feb 19 17:19:16 EST 2000


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