Craig Ringer <[EMAIL PROTECTED]> writes: > On Sat, 2004-12-18 at 00:40, Amir Dekel wrote: >> This must be the silliest question ever: >> >> What about user input in Python? (like stdin) >> Where can I find it? I can't find any references to it in the documentation. > > Under UNIX, I generally either use curses, or just put the terminal into > raw mode: > > .>>> def sane(): > .... os.system("stty sane") > .... > .>>> def raw(): > .... os.system("stty raw")
The termios gives module gives you the tools to manipulate the tty directly, without invoking stty. The tty module gives you an easier interface to those routines. However, it's missing a setsane functions. Hmm. I think it's time for another PEP. <mike -- Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list