Serge Orlov wrote:
> Kevin Simmons wrote:
>
> Looks reasonable if you don't need portability. But you may want to
> refactor it a little bit to make sure terminal setting are always
> restored:
>
> try:
> do_all_the_work()
> finally:
> os.system("stty cooked")
>
IIRC You need to do "stty
Kevin Simmons wrote:
> Thanks for your input. I found an answer that suits my needs, not curses
> :-), but stty settings and sys.stdin.read(n) :
>
> import os, sys
>
> while 1:
> os.system("stty -icanon min 1 time 0")
> print """
> Radio computer control program.
> -
Serge Orlov wrote:
> Cameron Laird wrote:
>> In article <[EMAIL PROTECTED]>,
>> Edward Elliott <[EMAIL PROTECTED]> wrote:
>>> Kevin Simmons wrote:
I have a python script that prompts the user for input from stdin via a
menu. I want to process that input when the user types in two charact
Cameron Laird wrote:
> In article <[EMAIL PROTECTED]>,
> Edward Elliott <[EMAIL PROTECTED]> wrote:
> >Kevin Simmons wrote:
> >> I have a python script that prompts the user for input from stdin via a
> >> menu. I want to process that input when the user types in two characters
> >> and not have t
In article <[EMAIL PROTECTED]>,
Edward Elliott <[EMAIL PROTECTED]> wrote:
>Kevin Simmons wrote:
>> I have a python script that prompts the user for input from stdin via a
>> menu. I want to process that input when the user types in two characters
>> and not have to have the user press . As a compa
Kevin Simmons wrote:
> I have a python script that prompts the user for input from stdin via a
> menu. I want to process that input when the user types in two characters
> and not have to have the user press . As a comparison, in the bash
> shell one can use (read -n 2 -p "-->" CHOICE; case $CHOICE
I have seen this question asked a few times but have not seen a
clear answer...
I have a python script that prompts the user for input from stdin via a
menu. I want to process that input when the user types in two characters
and not have to have the user press . As a comparison, in the bash
shell