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


Groups > comp.lang.python > #39126

Re: request for help

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <tampucciolina@libero.it>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.018
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'syntax': 0.03; 'subject:help': 0.07; 'python': 0.09; 'cc:addr:python-list': 0.10; 'def': 0.10; '"import': 0.16; '2.7.3': 0.16; 'incomplete': 0.16; 'syntaxerror:': 0.16; 'fix': 0.17; 'stefan': 0.17; 'subject:request': 0.17; 'shell': 0.18; 'math': 0.20; 'import': 0.21; '"",': 0.22; 'mention': 0.23; 'cc:2**1': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; '(most': 0.27; 'skip:( 20': 0.28; 'fine': 0.28; 'indentation': 0.29; 'url:mailman': 0.29; 'error': 0.30; 'code': 0.31; 'url:python': 0.32; 'file': 0.32; 'url:listinfo': 0.32; 'traceback': 0.33; 'guys': 0.33; 'thanks': 0.34; 'saved': 0.35; 'next': 0.35; 'url:org': 0.36; 'charset:us-ascii': 0.36; 'subject:: ': 0.38; 'received:192': 0.39; 'received:192.168': 0.40; 'url:mail': 0.40; 'your': 0.60; 'kind': 0.61; 'header:Message-Id:1': 0.62; 'time,': 0.62; 'here': 0.65; 'circle': 0.65; 'ore': 0.84; 'received:212.52.84': 0.84; 'received:libero.it': 0.84; 'received:212.52': 0.91
X-CTCH-Spam Unknown
X-CTCH-RefID str=0001.0A0C0204.51228BB9.002D,ss=1,re=0.000,fgs=0
X-libjamoibt 1823
Content-Type text/plain; charset=us-ascii
Mime-Version 1.0 (Mac OS X Mail 6.2 \(1499\))
Subject Re: request for help
From leonardo <tampucciolina@libero.it>
In-Reply-To <D78B804B-92F0-48EF-818B-F233B439AF60@vectorfabrics.com>
Date Mon, 18 Feb 2013 21:14:46 +0100
Content-Transfer-Encoding quoted-printable
References <B7C01624-32AB-49CE-AAB4-064A5B8E54CB@icloud.com> <D78B804B-92F0-48EF-818B-F233B439AF60@vectorfabrics.com>
To Stefan Holdermans <stefan@vectorfabrics.com>
X-Mailer Apple Mail (2.1499)
Cc "python-list@python.org" <python-list@python.org>, leonardo selmi <l.selmi@icloud.com>
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.1969.1361218498.2939.python-list@python.org> (permalink)
Lines 52
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1361218498 news.xs4all.nl 6860 [2001:888:2000:d::a6]:56881
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:39126

Show key headers only | View raw


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


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 | NextNext in thread | Find similar | Unroll thread


Thread

Re: request for help leonardo <tampucciolina@libero.it> - 2013-02-18 21:14 +0100
  Re: request for help Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-18 13:08 -0800

csiph-web