input of data from keyboard

Emile van Sebille emile at
Wed Aug 22 02:34:55 CEST 2001

>>> print raw_input.__doc__
raw_input([prompt]) -> string

Read a string from standard input.  The trailing newline is stripped.
If the user hits EOF (Unix: Ctl-D, Windows: Ctl-Z+Return), raise EOFError.
On Unix, GNU readline is used if enabled.  The prompt string, if given,
is printed without a trailing newline before reading.

>>> name = raw_input("Enter your name: ")
Enter your name: Emile
>>> name


Emile van Sebille
emile at

"Rajarshi Guha" <rajarshi at> wrote in message
news:9lusqh$bamlt$1 at
> Hi,
>   what function can I use to get input from the keyboard (or stdin)?
> --
> --
> Rajarshi Guha

More information about the Python-list mailing list