raw_input on several lines

Stefaan Himpe stefaan.himpe at gmail.com
Sat Aug 2 16:34:34 EDT 2008


> How can I change this behavior, so that another action is needed to stop the
> input? For example, CTRL-G. It would allow the user to input several lines.
> 

I don't think you can change raw_input's behaviour in this respect, but 
you could build something yourself that's based on interpretation of raw 
keyboard scan codes.

Google is your friend in this...

e.g. on Linux you could use something like urwid
e.g. on win32 you could use something like 
http://code.activestate.com/recipes/197140/

I am not aware of an os independent way to accomplish what you want.



More information about the Python-list mailing list