read sys.stdin, then raw_input

Rory Campbell-Lange rory at campbell-lange.net
Thu Mar 2 07:23:04 EST 2006


That works great for me on my unixoid system.

Thanks, Fredrik.

On 02/03/06, Fredrik Lundh (fredrik at pythonware.com) wrote:
> since there's only one input channel for a program (stdin), and raw_input
> reads from that channel, I don't think there's a portable way to do this.
> 
...
>     # rebind sys.stdin to my tty
>     sys.stdin = open("/dev/tty")
-- 
Rory Campbell-Lange 
<rory at campbell-lange.net>
<www.campbell-lange.net>



More information about the Python-list mailing list