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


Groups > comp.lang.python > #39127

Re: request for help

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <gary.herron@islandtraining.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'syntax': 0.03; 'subject:help': 0.07; 'python': 0.09; 'received:67.192': 0.09; 'received:67.192.241': 0.09; 'received:dfw.emailsrvr.com': 0.09; 'def': 0.10; '"import': 0.16; '"python': 0.16; '2.7.3': 0.16; 'carefully.': 0.16; 'correctly,': 0.16; 'incomplete': 0.16; 'syntaxerror:': 0.16; 'wrote:': 0.17; 'fix': 0.17; 'certainly': 0.17; 'stefan': 0.17; 'subject:request': 0.17; 'shell': 0.18; '>>>': 0.18; 'math': 0.20; 'import': 0.21; '"",': 0.22; 'received:emailsrvr.com': 0.22; 'mention': 0.23; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'looks': 0.26; '(most': 0.27; 'skip:( 20': 0.28; 'fine': 0.28; 'indentation': 0.29; 'url:mailman': 0.29; 'received:(smtp server)': 0.30; 'error': 0.30; 'code': 0.31; 'url:python': 0.32; 'file': 0.32; 'url:listinfo': 0.32; 'traceback': 0.33; 'to:addr:python-list': 0.33; 'guys': 0.33; 'text': 0.34; 'thanks': 0.34; 'saved': 0.35; 'pm,': 0.35; 'next': 0.35; 'url:org': 0.36; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'think': 0.40; 'your': 0.60; 'first': 0.61; 'kind': 0.61; 'time,': 0.62; 'here': 0.65; 'circle': 0.65; 'ore': 0.84; 'claim.': 0.91; 'examine': 0.95
X-Virus-Scanned OK
Date Mon, 18 Feb 2013 12:25:05 -0800
From Gary Herron <gary.herron@islandtraining.com>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2
MIME-Version 1.0
To python-list@python.org
Subject Re: request for help
References <B7C01624-32AB-49CE-AAB4-064A5B8E54CB@icloud.com> <D78B804B-92F0-48EF-818B-F233B439AF60@vectorfabrics.com> <BEF6F54A-CCFB-4014-B57B-28BD8A82C02E@libero.it>
In-Reply-To <BEF6F54A-CCFB-4014-B57B-28BD8A82C02E@libero.it>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1970.1361219111.2939.python-list@python.org> (permalink)
Lines 55
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1361219111 news.xs4all.nl 6945 [2001:888:2000:d::a6]:60769
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:39127

Show key headers only | View raw


On 02/18/2013 12:14 PM, leonardo wrote:
> thanks guys and sorry for my incomplete datas, here is the error message:
>
> Traceback (most recent call last):
>   File "<pyshell#0>", line 1, in <module>
>     import circle
>   File "circle.py", line 1
>     Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43)
>              ^
> SyntaxError: invalid syntax

If I read this error message correctly,  I don't think the contents of 
circle.py are at all what you claim.  It looks like the first line of 
circle.py contains the text "Python 2.7.3 ..." which is certainly not 
what you intended or claimed. Please examine the contents of circle.py 
very carefully.


>
>
> thanks for any help!
>
>
>
>
>
>
> Il giorno 18/feb/2013, alle ore 20:59, Stefan Holdermans <stefan@vectorfabrics.com> ha scritto:
>
>> Leonardi,
>>
>>> i saved the above program from python shell into a file as "circle.py" . when i type "import circle" i get  error..
>>
>> Next time, please mention what kind of error you're getting.
>>
>> Was it an indentation error? Because, as you pasted it, your code would lead to one.
>>
>> If I fix the indentation, as in
>>
>> import math
>>
>> def area(radius):
>>    return math.pi * radius**2
>>
>> def circumference(radius):
>>    return 2 * math.pi * radius
>>
>> it works fine for me.
>>
>> HTH,
>>
>> Stefan
>> -- 
>> http://mail.python.org/mailman/listinfo/python-list

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


Thread

Re: request for help Gary Herron <gary.herron@islandtraining.com> - 2013-02-18 12:25 -0800

csiph-web