[Tutor] raw_input function
Janssen at rz.uni-frankfurt.de
Sat Jan 31 04:12:33 EST 2004
On Wed, 28 Jan 2004, Alan Gauld wrote:
> def raw_input(prompt):
> print prompt,
> return sys.stdin.readline()
> Its actually a wee bit cleverer than that I think, but so far as
> we the users go its pretty close.
one thing the builtin raw_input does cleverer is readline support. You
only need to do a "import readline" first and many keybinding including
the cursor keys are working then.
Does anybody know how to get this with sys.stdin ?
More information about the Tutor