Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'oct': 0.02; '2.7': 0.05; 'behave': 0.07; 'received:localnet': 0.07; 'python': 0.07; 'nameerror:': 0.09; 'prefix': 0.09; '>>>': 0.12; 'exception': 0.12; 'slightly': 0.12; 'syntax': 0.12; 'modify': 0.14; 'say,': 0.14; 'wrote:': 0.14; 'defined': 0.15; '"copyright",': 0.16; '"credits"': 0.16; '"license"': 0.16; '11:43:26': 0.16; '[gcc': 0.16; 'happens.': 0.16; 'traceback': 0.16; '(most': 0.16; 'cc:2**0': 0.20; 'header:In-Reply-To:1': 0.22; 'previously': 0.22; 'changes.': 0.23; 'gregory': 0.23; 'last):': 0.23; "doesn't": 0.28; 'thanks': 0.29; 'class': 0.29; 'btw,': 0.31; 'ewing': 0.31; 'imported': 0.31; 'does': 0.31; 'sharing': 0.31; 'import': 0.32; 'to:addr:python-list': 0.32; 'done': 0.32; "i've": 0.33; 'change': 0.34; 'file': 0.35; 'header:User-Agent:1': 0.35; '"",': 0.35; 'received:au': 0.36; 'manner.': 0.38; 'url:org': 0.38; 'though': 0.38; 'url:au': 0.39; 'to:addr:python.org': 0.39; 'tested': 0.40; 'messages': 0.40; 'header:Message-Id:1': 0.62; '2011': 0.62; 'friday': 0.65; '"standard"': 0.84; 'cute': 0.84; 'me:': 0.84 From: Algis Kabaila Organization: PCUG - Users Helping Users To: python-list@python.org Subject: Re: Vectors Date: Fri, 22 Apr 2011 20:58:12 +1000 User-Agent: KMail/1.13.5 (Linux/2.6.35-25-generic-pae; KDE/4.5.1; i686; ; ) References: <91c4q0Fnl4U1@mid.individual.net> In-Reply-To: <91c4q0Fnl4U1@mid.individual.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Gregory Ewing X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 39 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1303469898 news.xs4all.nl 81481 [::ffff:82.94.164.166]:45575 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:3859 On Friday 22 April 2011 11:43:26 Gregory Ewing wrote: > Algis Kabaila wrote: > > the Vector3 class > > is available without any prefix euclid: > > > > import euclid > > v = Vector3(111.., 222.2, 333.3) > > Doesn't work that way for me: > > Python 2.7 (r27:82500, Oct 15 2010, 21:14:33) > [GCC 4.2.1 (Apple Inc. build 5664)] on darwin > Type "help", "copyright", "credits" or "license" for more > information. > > >>> import euclid > >>> Vector3 > > Traceback (most recent call last): > File "", line 1, in > NameError: name 'Vector3' is not defined > > Are you sure you hadn't previously done 'from euclid import > Vector3' or 'from euclid import *' in that session? I've tested it again and it does behave in a "standard" manner. I must have imported all as you suspected. Makes me much happier, though I do feel sheepish. As they say, sh... happens. BTW, I did modify the euclid very slightly to work with Python 3 - just change the syntax of messages with exception in line with syntax changes. Thanks for sharing your experience with that cute package! OldAl. -- Algis http://akabaila.pcug.org.au/StructuralAnalysis.pdf