Re: question on input function

2009-07-19 Thread John O'Hagan
On Mon, 20 Jul 2009, Richel Satumbaga wrote: > I am just learning python then I encountered an certain point in terms of > using the input function of python. the source code: >eq = input("enter an equation:"); >print " the result is : "; > > > the ou

Re: question on input function

2009-07-19 Thread Chris Rebert
On Sun, Jul 19, 2009 at 7:07 PM, Richel Satumbaga wrote: > I am just learning python then I encountered an certain point in terms of > using the input function of python. > the source code: >    eq = input("enter an equation:"); >    print " the result is : "

question on input function

2009-07-19 Thread Richel Satumbaga
I am just learning python then I encountered an certain point in terms of using the input function of python. the source code:    eq = input("enter an equation:");    print " the result is : "; the output seen in the command window: >>> enter an equation:[

Re: Who uses input()? [was Re: question on "input"]

2005-07-18 Thread Terry Reedy
"Nathan Pinno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I use input() all the time. I know many people say it ain't safe, but > whose going to use it to crash their own comp? Only an insane person > would, This is usage Guido intended it for, not for production apps distri

Re: Who uses input()? [was Re: question on "input"]

2005-07-17 Thread Nathan Pinno
Pinno - Original Message - From: "Stephen Thorne" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: Sent: Sunday, July 17, 2005 11:12 PM Subject: Re: Who uses input()? [was Re: question on "input"] > On 15/07/05, Terry Hancock <[EMAIL

Re: Who uses input()? [was Re: question on "input"]

2005-07-17 Thread Stephen Thorne
On 15/07/05, Terry Hancock <[EMAIL PROTECTED]> wrote: > On Thursday 14 July 2005 07:00 am, Michael Hoffman wrote: > > Devan L wrote: > > > Use raw_input instead. It returns a string of whatever was typed. Input > > > expects a valid python expression. > > > > Who actually uses this? It's equivalent

Re: Who uses input()? [was Re: question on "input"]

2005-07-14 Thread Terry Hancock
On Thursday 14 July 2005 07:00 am, Michael Hoffman wrote: > Devan L wrote: > > Use raw_input instead. It returns a string of whatever was typed. Input > > expects a valid python expression. > > Who actually uses this? It's equivalent to eval(raw_input(prompt)) but > causes a lot of newbie confusi

Who uses input()? [was Re: question on "input"]

2005-07-14 Thread Michael Hoffman
Devan L wrote: > Use raw_input instead. It returns a string of whatever was typed. Input > expects a valid python expression. Who actually uses this? It's equivalent to eval(raw_input(prompt)) but causes a lot of newbie confusion. Python-dev archives revealed that someone tried to get this depre

Re: question on "input"

2005-07-12 Thread Devan L
Use raw_input instead. It returns a string of whatever was typed. Input expects a valid python expression. -- http://mail.python.org/mailman/listinfo/python-list

Re: question on "input"

2005-07-12 Thread Bill Mill
On 12 Jul 2005 07:31:47 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > > I want to accept the user's answer yes or no. > If I do this: > > answer = input('y or n?') Use raw_input instead: >>> answer = raw_input("y or n?") y or n?y >>> answer 'y' Check out the documentation of both

question on "input"

2005-07-12 Thread [EMAIL PROTECTED]
Hi, I want to accept the user's answer yes or no. If I do this: answer = input('y or n?') and type y on the keyboard, python complains Traceback (most recent call last): File "", line 1, in ? File "", line 0, in ? NameError: name 'y' is not defined It seems like input only accepts numerals