Newbie question: Input

Darrell news at dorb.com
Mon Nov 8 14:55:07 CET 1999


>From Python Library Reference:

raw_input ([prompt])
If the prompt argument is present, it is written to standard output without
a trailing newline. The function then reads a line from input, converts it
to a string (stripping a trailing newline), and returns that. When EOF is
read, EOFError is raised. Example:

>>> s = raw_input('--> ')
--> Monty Python's Flying Circus
>>> s
"Monty Python's Flying Circus"
>>>

If the readline module was loaded, then raw_input() will use it to provide
elaborate line editing and history features.

--
--Darrell
Endgamer <endgamer71 at hotmail.com> wrote in message
news:3826b693.3888197 at 212.225.36.99...
> Okay, I know it's a damn stupid question, but I've been through the
> books, the texts, the tutorial, the language reference and no luck...
>
> Whats the syntax to prompt for user input?
>
>
> Endgamer
> Spider Warrior
>
> (Endgamer71 at spamtrap.hotmail.com)
> #####################################
> Not a quote, just an on-the-spot observation:
> You know you're a geek when your PC costs exactly
> 15 times as much as your stereo. And gives better
> sound quality.<sigh>
>                               Endgamer
> #####################################
>
> --
> http://www.python.org/mailman/listinfo/python-list






More information about the Python-list mailing list