Vectors
Algis Kabaila
akabaila at pcug.org.au
Fri Apr 22 06:58:12 EDT 2011
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 "<stdin>", line 1, in <module>
> 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
More information about the Python-list
mailing list