Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #73634

Re: Newbie coding question

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 <shieldfire@gmail.com>
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; '&gt;': 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 <g3_qv.159151$vj7.145337@fx27.am4>
References <mailman.11263.1403808853.18130.python-list@python.org> <g3_qv.159151$vj7.145337@fx27.am4>
Date Thu, 26 Jun 2014 21:16:21 +0200
Subject Re: Newbie coding question
From Martin S <shieldfire@gmail.com>
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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.11267.1403811513.18130.python-list@python.org> (permalink)
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

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Ah, that was actually correct.
Thanks ...

/Martin S


2014-06-26 20:58 GMT+02:00 alister <alister.nospam.ware@ntlworld.com>:

> 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 "<pyshell#0>", line 1, in <module>
> >     person = input('Enter your name: ')
> >   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,

Martin S

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Newbie coding question Martin S <shieldfire@gmail.com> - 2014-06-26 20:53 +0200
  Re: Newbie coding question alister <alister.nospam.ware@ntlworld.com> - 2014-06-26 18:58 +0000
    Re: Newbie coding question Martin S <shieldfire@gmail.com> - 2014-06-26 21:16 +0200

csiph-web