input of data from keyboard

Emile van Sebille emile at fenx.com
Tue Aug 21 20:50:18 EDT 2001


Watch out.  Better stick to raw_input as input evals what is entered.  Check
past postings for specific inputs that render your system useless.

Or-get-back-space-you-never-wanted-to-have-ly y'rs

--

Emile van Sebille
emile at fenx.com

---------
"Adam 'Vonlia' Seyfarth" <adam.seyfarth at home.com> wrote in message
news:Pine.LNX.4.33.0108211930390.2562-100000 at cc489744-a.htsbrg1.ms.home.com.
..
>
> On Tue, 21 Aug 2001, Rajarshi Guha wrote:
>
> > Hi,
> >   what function can I use to get input from the keyboard (or stdin)?
>
> (I'm surprised nobody responded sooner...) You can use the input()
> function, or raw_input() function
>
> >>> print input.__doc__
> input([prompt]) -> value
>
> Equivalent to eval(raw_input(prompt)).
> >>> 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.
> >>>
>
>
> HTH
>
>
> --
>      Thanksgiving is coming on the 4th of July
>      In the form of a girl with a needle in her eye...
>                -- The Butt Hole Surfers: The Lord is a Monkey
>
>    /||  Adam Seyfarth   <http://members.home.net/adam.seyfarth/>  ||\
>   /«||  <mailto:cloud at users.sf.net>       Geekcode, version 3.12  ||»\
>   \«||  GU d-- s+: a---- C++ UL+>++ P-- L++ E-- W++ N++ o K- w--  ||»/
>    \||  O M- V- PE- Y PGP- t 5 X R tv+ b+ DI+ D+ G e-- h! !r !y+  ||/
>




More information about the Python-list mailing list