Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python,': 0.02; 'tutorial': 0.03; 'win32': 0.03; 'from:addr:yahoo.co.uk': 0.04; 'syntax': 0.04; 'interpreter': 0.05; 'lines,': 0.07; 'mouse': 0.07; 'subject:help': 0.08; 'key.': 0.09; 'literal': 0.09; 'option,': 0.09; 'python': 0.11; 'jan': 0.12; '2.7': 0.14; 'changes': 0.15; 'windows': 0.15; '"python': 0.16; "'''": 0.16; "'input'": 0.16; '(note': 0.16; 'clark': 0.16; 'dump': 0.16; 'effect,': 0.16; 'function),': 0.16; 'highlight': 0.16; 'instead:': 0.16; 'list"': 0.16; 'quotes)': 0.16; 'relates': 0.16; 'reply-to:addr:yahoo.co.uk': 0.16; 'sorting': 0.16; 'syntaxerror:': 0.16; 'thursday,': 0.16; 'wrote:': 0.18; 'library': 0.18; 'bit': 0.19; 'trying': 0.19; 'thu,': 0.19; 'written': 0.21; 'seems': 0.21; 'command': 0.22; '>>>': 0.22; 'select': 0.22; '(in': 0.22; 'email addr:gmail.com>': 0.22; 'to:name:python-list@python.org': 0.22; 'print': 0.22; '>>>': 0.24; 'keyboard': 0.24; 'initial': 0.24; 'versions': 0.24; 'looks': 0.24; 'downloaded': 0.26; 'header:In- Reply-To:1': 0.27; 'record': 0.27; 'to:2**1': 0.27; 'tried': 0.27; 'function': 0.29; 'am,': 0.29; 'character': 0.29; "doesn't": 0.30; 'statement': 0.30; 'skip:( 20': 0.30; "skip:' 10": 0.31; '>>>>': 0.31; 'flags': 0.31; 'post.': 0.31; 'quotes': 0.31; 'subject:end': 0.31; 'terminate': 0.31; 'file': 0.32; 'probably': 0.32; 'checked': 0.32; 'figure': 0.32; 'open': 0.33; 'url:python': 0.33; 'community': 0.33; 'copying': 0.34; 'screen': 0.34; 'anywhere': 0.35; 'skip:s 30': 0.35; 'definition': 0.35; 'but': 0.35; 'there': 0.35; 'version': 0.36; 'transition': 0.36; 'url:org': 0.36; 'should': 0.36; 'changing': 0.37; 'january': 0.37; 'list.': 0.37; 'thank': 0.38; 'nov': 0.38; 'to:addr:python-list': 0.38; 'list,': 0.38; 'rather': 0.38; 'that,': 0.38; 'anything': 0.39; '(from': 0.39; 'quote': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'skip:p 20': 0.39; 'space': 0.40; 'skip:x 10': 0.40; 'easy': 0.60; 'enclosed': 0.60; 'received:212.82': 0.60; 'most': 0.60; 'hope': 0.61; 'url:3': 0.61; 'entire': 0.61; "you're": 0.61; 'first': 0.61; 'complete': 0.62; "you've": 0.63; 'choose': 0.64; 'more': 0.64; 'different': 0.65; 'taking': 0.65; '30,': 0.65; 'skip:\xe2 10': 0.65; 'to:addr:gmail.com': 0.65; 'here': 0.66; 'reply': 0.66; 'between': 0.67; 'header:Reply-To:1': 0.67; '19th': 0.68; 'invalid': 0.68; 'statement,': 0.68; 'containing': 0.69; 'fact,': 0.69; 'to,': 0.72; 'click': 0.77; '\xe2\x80\x93': 0.77; 'ending': 0.78; '2014,': 0.84; '8bit%:16': 0.84; 'out!': 0.84; 'pasting': 0.84; 'prolong': 0.84; 'quote,': 0.84; '2013,': 0.91; 'norwegian': 0.91; 'ware': 0.91; 'from.': 0.93; 'confirms': 0.95; 'directly.': 0.95; 'online,': 0.96 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 355994.82323.bm@omp1023.mail.ir2.yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1391110021; bh=rZ4q+uyc+xirCRQ1gFdCguzMDAfwn2vZ9jsU7Pajsv0=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=RGSG9nGhWBhD+HHp6Ihi7ct92OME6abUSpng146tUUKcGOXUYLHD9iOwd39tqE81fHPaa7amue6aQ1xqgjxfLIWcP0Tg8nH5RbGBkeuvFwdxXDRs+SaZ7Ypkonu78hZRucGn8BcC4GS+/KmAxDfCF90v9REn6nq5tVZjeYE5vRs= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=WdYnNT48n8Kwvvj80WqLHmZ4Onykyk3e0e+4ROhkxM/cJRsNnanea1UTJbCSich9ojsUPGOECuFouS+WOmelmueVRtrbNG96P5qMmgbohQX1BEiYTwZ71w1R5VIZcRvyTEwDgi3cehNaQLopuC05GsTdbh7iFHCzLVGo9ci6NfU=; X-YMail-OSG: U5vY..cVM1noDwGk1iCdZNlBCQqkxxJ1tQn4KPr2G7KepiV 6qV9GrHvI7FlLH7rlkuX1MWV9Xzn7b_vnOniUl6Obgqkb57ummk9_bZ7m7UX KzUtDsf0dMnTY9ovHGlqY0fkshEHNT2Alm5FFec37qYhwbHyfreUFxBIyZkU 5KC1LnMqrLsttoKJj962VX15pJO3fRTLj9a_buJQikchPKCcDyimfvcLrTxL EQwD2SNNPdiKGsrxLuIgzbXjpy.k3NrnjYGqD2_o1EhvNVH7gCv4DuTFkPM5 Uzl5kFnTuRA6lIYLZu8kJVU8DGr6bqFuIlm6PpFbm7aXa6tavj6zBWj_CYcU qJ8czd2qe6PGQ7iNNc7NSqXqdSJgzxnpxibXWy35h_6EMBvZ79Hzn.MIw0W8 Abs1BdOP3YwkVdaf_1JM7IGS0MnTM74PpUVIirrH9nerO.KoE_TkjyfKuvnj mFO88YKHcdNVrvj.TkL5ejG7LPsLhPboX6nd444YeJMNXkNuopANe_.H87mD hZ2y5pQK_D6FWeuZ3jlVVkkhXH11gv21Ud9tNRiQOyXpqp6iJLsD0sJrzYgg tPJ2eLGp2xsOWtZC9BNET8LdafKvwaYrFlFY3W5EOrHGIkJbS9E1oKQ6C8t0 Kccx7ejMtbL_46yIF2lv8FDjEgTUgINPj X-Rocket-MIMEInfo: 002.001, VGhhbmsteW91LsKgIFBsZWFzZSBuby1vbmUgcmVwbHkgdG8gdGhpcyBwb3N0LsKgIEkganVzdCB3YW50IHRvIHB1dCBvbiByZWNvcmQgbXkgY29tcGxldGUgcC1vZmZlZC1uZXNzLCB0aGF0IGhhdmluZyBzcGVudCAxMCBkYXlzIHNvcnRpbmcgb3V0IGFuZCBoeXBlcnRleHRpbmcgYSBsaWJyYXJ5IG9mIGRvY3VtZW50YXRpb24sIEkgbm93IGhhdmUgdG8gc3RhcnQgYWxsIG92ZXIuCgpQbGVhc2UgZG8gbm90IHJlc3BvbmQsIEkgYW0gc3VyZSBpdCBpcyBhbGwgbXkgZmF1bHQuCgpQbGVhc2UgZG8gbm90IHJlc3ABMAEBAQE- X-Mailer: YahooMailWebService/0.8.174.629 References: <1391088376.73476.YahooMailNeo@web133103.mail.ir2.yahoo.com> <1391093552.89290.YahooMailNeo@web133104.mail.ir2.yahoo.com> Date: Thu, 30 Jan 2014 19:27:00 +0000 (GMT) From: Peter Clark Subject: Re: end quote help for a newbie To: Zachary Ware , "python-list@python.org" In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-1437147565-313926967-1391110020=:83595" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Peter Clark 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: 189 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1391110134 news.xs4all.nl 2922 [2001:888:2000:d::a6]:60322 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65041 ---1437147565-313926967-1391110020=:83595 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thank-you.=C2=A0 Please no-one reply to this post.=C2=A0 I just want to put= on record my complete p-offed-ness, that having spent 10 days sorting out = and hypertexting a library of documentation, I now have to start all over.= =0A=0APlease do not respond, I am sure it is all my fault.=0A=0APlease do n= ot respond - it will only prolong the agony.=0A=0ALong live the Norwegian b= lue.=0A=0Apeter=0A=0A=0A=0AOn Thursday, 30 January 2014, 17:31, Zachary War= e wrote:=0A =0APlease reply to the list, r= ather than to me directly.=C2=A0 You can use=0A"Reply to List" if you have = that option, or "Reply to All" to make=0Asure you include the list.=0A=0AOn= Thu, Jan 30, 2014 at 8:52 AM, Peter Clark wrote:= =0A> I do not know how to dump the screen - it will not let me select anyth= ing=0A> with the mouse cursor, so here is my (typed in) reproduction:=0A=0A= Since it looks like you're probably using Windows Command Prompt, you=0Acan= right click anywhere in that window, click "Mark", and highlight a=0Arecta= ngle containing what you want and hit the Enter key.=C2=A0 Note that=0Ait d= oesn't go by lines, only the rectangle you highlight will be=0Acopied! (Yes= , it is horribly annoying :)=0A=0AThank you for taking the time to type it = all out!=0A=0A> Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:18:40)= =C2=A0 [MSC v.1600 32=0A> bit (In=0A> tel) on win32=0A> Type "help", "copyr= ight", "credits" or "license" for more information.=0A>>>> print "xyz"=0A>= =C2=A0 =C2=A0 =C2=A0 File "(stdin)", line 1=0A>=C2=A0 =C2=A0 =C2=A0 =C2=A0 = print "xyz"=0A>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 ^=0A> SyntaxError: invalid syntax=0A=0AThis right = here confirms what I thought: you're using Python 3 with a=0APython 2 tutor= ial.=C2=A0 'print' in Python 3 is a function just like=0A'input' or 'open',= so you have to use it like this instead:=0A=0A=C2=A0 >>> print("xyz")=0A= =C2=A0 xyz=0A=0A=0A=0A>>>> print '''xyz"=C2=A0 . . .'''=0A>=C2=A0 =C2=A0 = =C2=A0 File "(stdin)", line 1=0A>=C2=A0 =C2=A0 =C2=A0 =C2=A0 print '''xyz'= ''=0A>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 ^=0A> SyntaxError: invalid syntax=0A>>>> print '''xyz= "=C2=A0 . . .''=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 (note - not appearing on=0A>>>> screen - this is 2 single quotes= )=0A> ... '''=0A>=C2=A0 =C2=A0 File "(stdin)", line 2=0A>=C2=A0 =C2=A0 =C2= =A0 =C2=A0 '''=0A>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^=0A> SyntaxError: in= valid syntax=0A>>>>=0A>=0A> I do not see anywhere a definition of which ver= sion the tutorial relates to,=0A> but I downloaded it from the Python site = on 19th January 2014.=0A=0AThe Python website provides docs for every curre= nt version of Python,=0Aand the community is currently in the midst of a ve= ry long transition=0Afrom version 2.7 to 3.x, so both versions are consider= ed "current".=0AIn fact, most links to the Python documentation will link t= o the 2.7=0Aversion to maintain compatibility.=C2=A0 Here's a link to the P= ython 3=0Aversion of the tutorial, which should work much better for you!= =0Ahttp://docs.python.org/3/tutorial/=0A=0AYou can also find the docs in yo= ur Python installation: find Python=0A3.3 in your start menu, and choose "P= ython Manuals".=C2=A0 This will open=0Athe same docs as are found online, i= n standard Windows help file=0Aformat.=C2=A0 Click the "Tutorial" link on t= he first page of that, and you=0Ashould have the right tutorial to work fro= m.=0A=0AHope this helps, and welcome to Python!=0A=0A--=0A=0AZach=0A=0A=0A>= =0A> peter.=0A>=0A> On Thursday, 30 January 2014, 16:13, Zachary Ware=0A> <= zachary.ware+pylist@gmail.com> wrote:=0A>=0A> On Thu, Jan 30, 2014 at 7:26 = AM, Peter Clark wrote:=0A>=0A>> There is probably = an easy solution to this =E2=80=93 but I have not found it.=0A>>=0A>> Tryin= g to terminate a literal in a print statement (from the tutorial).=0A>>=0A>= > The literal should be enclosed in double quotes =E2=80=9C =E2=80=9C=0A>>= =0A>> the initial double quote seems to be OK (if I use a different charact= er it=0A>> flags it) but the ending is flagged as invalid syntax.=C2=A0 I h= ave tried=0A>> changing my keyboard from UK to USA, without any effect, and= tried adding=0A>> a=0A>> space after the final double quote,=0A>=0A>=0A> W= hich version of Python are you using?=C2=A0 Make sure you're using the=0A> = same version of interpreter and tutorial.=C2=A0 'print' was one of the big= =0A> changes between Python 2 and Python 3 (in Python 2 it was a statement,= =0A> while in Python 3 it is a function), so a tutorial written with Python= =0A> 2 in mind will have some issues if you're using Python 3.=0A>=0A> If y= ou've already checked that, try copying and pasting your entire=0A> interpr= eter session into a reply here, and we'll be more able to=0A> figure out wh= at's going on.=0A>=0A> Hope this helps,=0A>=0A> --=0A> Zach=0A> ---1437147565-313926967-1391110020=:83595 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Thank-you.  Please no-one reply to this post.=   I just want to put on record my complete p-offed-ness, that having s= pent 10 days sorting out and hypertexting a library of documentation, I now= have to start all over.

Please do not respond, I am sure it is all my fault.

Please do not respond - it will only prolong = the agony.

Long live the= Norwegian blue.

peter


=
On = Thursday, 30 January 2014, 17:31, Zachary Ware <zachary.ware+pylist@gmai= l.com> wrote:
Please = reply to the list, rather than to me directly.  You can use
"Reply to List" if you have that option, or "Reply to All" to mak= e
sure you include the list.

On Thu, Jan 30, 2014 at 8:52 AM, Peter Clark <artomishka@yahoo.co.uk> wrote:
> I do n= ot know how to dump the screen - it will not let me select anything
> with the mouse cursor, so here is my (typed in) reproductio= n:

Since it looks like you're probably= using Windows Command Prompt, you
can right click anywhere in that window, cli= ck "Mark", and highlight a
rectangle containing what you = want and hit the Enter key.  Note that
it doesn't go= by lines, only the rectangle you highlight will be
copie= d! (Yes, it is horribly annoying :)

Th= ank you for taking the time to type it all out!

> Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:18:40)&nb= sp; [MSC v.1600 32
> bit (In
> te= l) on win32
> Type "help", "copyright", "credits" or "= license" for more information.
>>>> print "xy= z"
>      File "(stdin)", line 1
>        print "xyz"
= >                    &= nbsp;   ^
> SyntaxError: invalid syntax

This right here confirms what I thought: you're using Python 3 w= ith a
Python 2 tutorial.  'print' in Python 3 is a f= unction just like
'input' or 'open', so you have to use i= t like this instead:

  >>&= gt; print("xyz")
  xyz



>>>> print '''x= yz"  . . .'''
>      File "(stdin)= ", line 1
>        print '''xyz''= '
>              &n= bsp;           ^
> SyntaxErro= r: invalid syntax
>>>> print '''xyz"  . = . .''                    = (note - not appearing on
>>>> screen - this is 2 single quotes)
> ... '''
>    File "(stdin)",= line 2
>        '''
>          ^
> Synta= xError: invalid syntax
>>>>
>
> I do not see anywhere a definition of which ve= rsion the tutorial relates to,
> but I downloaded it f= rom the Python site on 19th January 2014.

The Python website provides docs for every current version of Python,and the community is currently in the midst of a very long= transition
from version 2.7 to 3.x, so both versions are= considered "current".
In fact, most links to the Python = documentation will link to the 2.7
version to maintain co= mpatibility.  Here's a link to the Python 3
version of the tutorial, which sh= ould work much better for you!
http://docs.python.or= g/3/tutorial/

You can also find th= e docs in your Python installation: find Python
3.3 in yo= ur start menu, and choose "Python Manuals".  This will open
the same docs as are found online, in standard Windows help file<= br clear=3D"none">format.  Click the "Tutorial" link on the first page= of that, and you
should have the right tutorial to work = from.

Hope this helps, and welcome to = Python!

--

Zach


>
> peter.
>
> On Thursday, 30 January 2014, 16:13, Zachary Ware
> <zachary.wa= re+pylist@gmail.com> wrote:
>
> On Thu, Jan 30, 2014 at 7:26 AM, Peter Clark <artomishka@yahoo.co.uk> wrote:
&g= t;
>> There is probably an easy solution to this = =E2=80=93 but I have not found it.
>>
>> Trying to terminate a literal in a print statement (from the = tutorial).
>>
>> The litera= l should be enclosed in double quotes =E2=80=9C =E2=80=9C
>>
>> the initial double quote seems to be O= K (if I use a different character it
>> flags it) b= ut the ending is flagged as invalid syntax.  I have tried
>> changing my keyboard from UK to US= A, without any effect, and tried adding
>> a
>> space after the final double quote,
= >
>
> Which version of Python = are you using?  Make sure you're using the
> same= version of interpreter and tutorial.  'print' was one of the big
> changes between Python 2 and Python 3 (in Python 2 it wa= s a statement,
> while in Python 3 it is a function), = so a tutorial written with Python
> 2 in mind will hav= e some issues if you're using Python 3.
>
> If you've already checked that, try copying and pasting your ent= ire
> interpreter session into a reply here, and we'll= be more able to
> figure out what's going on.
>
> Hope this helps,
>
> --
> Zach
>

---1437147565-313926967-1391110020=:83595--