input of data from keyboard

Emile van Sebille emile at fenx.com
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'
>>>

HTH
--

Emile van Sebille
emile at fenx.com

---------
"Rajarshi Guha" <rajarshi at seed.chem.psu.edu> wrote in message
news:9lusqh$bamlt$1 at ID-91520.news.dfncis.de...
> Hi,
>   what function can I use to get input from the keyboard (or stdin)?
>
> TIA
> --
> --
> Rajarshi Guha




More information about the Python-list mailing list