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: 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 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: In-Reply-To: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 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 "", line 1, in > 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 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