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


Groups > comp.lang.python > #65041

Re: end quote help for a newbie

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 <artomishka@yahoo.co.uk>
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&gt;': 0.22; 'to:name:python-list@python.org': 0.22; 'print': 0.22; '&gt;&gt;&gt;': 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> <CAKJDb-PpPiFnG7=jmrUGnXZPqkdHWHFCxe9N6Dct5gbrQT5sdQ@mail.gmail.com> <1391093552.89290.YahooMailNeo@web133104.mail.ir2.yahoo.com> <CAKJDb-Nqo_+f-m3iMBexkCFeF60yyKLgqeFH7N6762_z2zoa5Q@mail.gmail.com>
Date Thu, 30 Jan 2014 19:27:00 +0000 (GMT)
From Peter Clark <artomishka@yahoo.co.uk>
Subject Re: end quote help for a newbie
To Zachary Ware <zachary.ware+pylist@gmail.com>, "python-list@python.org" <python-list@python.org>
In-Reply-To <CAKJDb-Nqo_+f-m3iMBexkCFeF60yyKLgqeFH7N6762_z2zoa5Q@mail.gmail.com>
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 <artomishka@yahoo.co.uk>
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.6159.1391110134.18130.python-list@python.org> (permalink)
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

Show key headers only | View raw


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

Thank-you.  Please no-one reply to this post.  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.

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@gmail.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 make
sure you include the list.

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

Since it looks like you're probably using Windows Command Prompt, you
can right click anywhere in that window, click "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
copied! (Yes, it is horribly annoying :)

Thank you for taking the time to type it all out!

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

This right here confirms what I thought: you're using Python 3 with a
Python 2 tutorial.  'print' in Python 3 is a function just like
'input' or 'open', so you have to use it like this instead:

   >>> print("xyz")
   xyz



>>>> print '''xyz"  . . .'''
>      File "(stdin)", line 1
>         print '''xyz'''
>                          ^
> SyntaxError: invalid syntax
>>>> print '''xyz"  . . .''                    (note - not appearing on
>>>> screen - this is 2 single quotes)
> ... '''
>     File "(stdin)", line 2
>         '''
>          ^
> SyntaxError: invalid syntax
>>>>
>
> I do not see anywhere a definition of which version the tutorial relates to,
> but I downloaded it from 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 compatibility.  Here's a link to the Python 3
version of the tutorial, which should work much better for you!
http://docs.python.org/3/tutorial/

You can also find the docs in your Python installation: find Python
3.3 in your start menu, and choose "Python Manuals".  This will open
the same docs as are found online, in standard Windows help file
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.ware+pylist@gmail.com> wrote:
>
> On Thu, Jan 30, 2014 at 7:26 AM, Peter Clark <artomishka@yahoo.co.uk> wrote:
>
>> There is probably an easy solution to this – but I have not found it.
>>
>> Trying to terminate a literal in a print statement (from the tutorial).
>>
>> The literal should be enclosed in double quotes “ “
>>
>> the initial double quote seems to be OK (if I use a different character it
>> flags it) but the ending is flagged as invalid syntax.  I have tried
>> changing my keyboard from UK to USA, 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 was a statement,
> while in Python 3 it is a function), so a tutorial written with Python
> 2 in mind will have some issues if you're using Python 3.
>
> If you've already checked that, try copying and pasting your entire
> interpreter session into a reply here, and we'll be more able to
> figure out what's going on.
>
> Hope this helps,
>
> --
> Zach
>

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


Thread

Re: end quote help for a newbie Peter Clark <artomishka@yahoo.co.uk> - 2014-01-30 19:27 +0000

csiph-web