Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'tutorial': 0.03; 'correct.': 0.07; 'incompatible': 0.07; 'subject:question': 0.10; 'martin': 0.11; 'python': 0.11; 'suggest': 0.14; 'changes': 0.15; 'ah,': 0.16; 'nameerror:': 0.16; 'stupid,': 0.16; 'subject:coding': 0.16; 'url:luc': 0.16; 'wrote:': 0.18; 'obviously': 0.18; 'thu,': 0.19; 'written': 0.21; 'input': 0.22; 'install': 0.23; 'error': 0.23; '2.x': 0.24; '(or': 0.24; "i've": 0.25; '>': 0.26; 'url:edu': 0.26; 'defined': 0.27; 'header:In- Reply-To:1': 0.27; 'idea': 0.28; 'correct': 0.29; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; '"",': 0.31; '3.x': 0.31; '>>>>': 0.31; 'anyone': 0.31; 'file': 0.32; 'url:python': 0.33; '(most': 0.33; 'guess': 0.33; 'skip:& 30': 0.33; "can't": 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; '+0200,': 0.36; 'url:listinfo': 0.36; 'doing': 0.36; 'thanks': 0.36; 'hi,': 0.36; 'url:org': 0.36; 'wrong': 0.37; 'skip:& 10': 0.38; 'to:addr :python-list': 0.38; 'recent': 0.39; 'skip:& 20': 0.39; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'url:3': 0.61; 'name:': 0.61; 'name': 0.63; 'here': 0.66; 'between': 0.67 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=M6jHf5lk9h6NFj4o29c2U8gTO4ky2eeDwWiKhvcgOnY=; b=RH1pSk8jwU96v2dcerYeihEjSeHgQ5bKxRomwd4y4TEk4d2bDgsqvnMX6SDB26vNOo Ss8SsZtG7M6m9I7/RpDWCYZ98IOVxc86A+YfW4BO51xuKIW04XG3Ah8DPO1+NS4MWFZ+ Kw54vrBH08kGys2CHLN98RfGAN2RdkdLEqT2vFx7aJ6MsVDHv1H/oZbefMFOzfaWGAZW w1ucqpGPOwEzytT0eH9Z6Xn8x5jAQyh1+peQKfOr0jplsV8BaPE609A5BBb+uWBjTwyw gjo1ctKJdielo/sFf6kNXw1xV9yQizdO4T6SU7Si9dgUd/C03CPgXl7+neGZihLhqddI mIRQ== MIME-Version: 1.0 X-Received: by 10.52.233.9 with SMTP id ts9mr94446vdc.96.1403810181843; Thu, 26 Jun 2014 12:16:21 -0700 (PDT) In-Reply-To: References: Date: Thu, 26 Jun 2014 21:16:21 +0200 Subject: Re: Newbie coding question From: Martin S To: python-list@python.org Content-Type: multipart/alternative; boundary=089e013a2080388f6d04fcc207bf X-Mailman-Approved-At: Thu, 26 Jun 2014 21:38:32 +0200 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 122 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1403811513 news.xs4all.nl 2960 [2001:888:2000:d::a6]:40357 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:73634 --089e013a2080388f6d04fcc207bf Content-Type: text/plain; charset=UTF-8 Ah, that was actually correct. Thanks ... /Martin S 2014-06-26 20:58 GMT+02:00 alister : > On Thu, 26 Jun 2014 20:53:35 +0200, Martin S wrote: > > > Hi, > > > > I've been following the tutorial here > > http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/ > > But when I get to section 1.10 there is > > > > person = input('Enter your name: ') > > > > However this generates an error > > > > > >>>> person = input('Enter your name: ') > > Enter your name: hi > > > > Traceback (most recent call last): > > File "", line 1, in > > person = input('Enter your name: ') > > File "", line 1, in > > NameError: name 'hi' is not defined > >>>> > >>>> > > I have no idea what I am doing wrong with this - it look correct to me. > > > > I'm obviously doing something stupid, anyone can suggest what? > > > > /M . > > As a quick guess you are using python 2.X when the tutorial is written > for python 3.X > Input is one of the incompatible changes between 2.x & 3.x > try raw_input instead (or install Python 3) > > > > -- > You can't get there from here. > -- > https://mail.python.org/mailman/listinfo/python-list > -- Regards, Martin S --089e013a2080388f6d04fcc207bf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Ah, that was actually correct.
Thanks .= ..

/Martin S


2014-06-26 20:58 GMT+02:00 alister = <a= lister.nospam.ware@ntlworld.com>:
On T= hu, 26 Jun 2014 20:53:35 +0200, Martin S wrote:

> Hi,
>
> I've been following the tutorial here
> http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/ > But when I get to section 1.10 there is
>
> person =3D input('Enter your name: ')
>
> However this generates an error
>
>
>>>> person =3D input('Enter your name: ')
> Enter your name: hi
>
> Traceback (most recent call last):
> =C2=A0 File "<pyshell#0>", line 1, in <module> > =C2=A0 =C2=A0 person =3D input('Enter your name: ')
> =C2=A0 File "<string>", line 1, in <module>
> NameError: name 'hi' is not defined
>>>>
>>>>
> I have no idea what I am doing wrong with this - it look correct to me= .
>
> I'm obviously doing something stupid, anyone can suggest what?
>
> /M .

As a quick guess you are using python 2.X when the tutorial is = written
for python 3.X
Input is one of the incompatible changes between 2.x & 3.x
try raw_input instead (or install Python 3)



--
You can't get there from here.
--
https://mail.python.org/mailman/listinfo/python-list



--
Regards,<= br>
Martin S
--089e013a2080388f6d04fcc207bf--