annoying stdin/stdout + pipes problem

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Mon Sep 24 04:18:10 EDT 2007


En Mon, 24 Sep 2007 04:04:07 -0300, per9000 <per9000 at gmail.com> escribi�:

> On 23 Sep, 18:24, Damjan <gdam... at gmail.com> wrote:
>> > I want to create a program that reads input from stdio that can prompt
>> > a user for input while doing so without getting into problems.
>> ...
>>
>> The trick (which works on Linux for sure) is to open /dev/tty and ask
>> question/get input on/from it.
>
> it worked just fine on my Gnu/Linux machine, but I'd really like it to
> be independent of OS. Any one else got some idea - or a windows
> version of the same?

On Windows it's almost the same, using "conin$" as the filename for  
console input, and "conout$" as the filename for console output.

-- 
Gabriel Genellina




More information about the Python-list mailing list