stdin: processing characters
Russ Salsbury
clpy at russellsalsbury.com
Mon May 1 16:10:01 EDT 2006
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 raw" first. The last time I had to do this
was in the '80's, so take for what it's worth.
Russ
More information about the Python-list
mailing list