[Edu-sig] Fw: [Visualpython-users] Advice?
Arthur Siegel
ajs@ix.netcom.com
Sat, 9 Jun 2001 10:06:52 -0400
Can anyone here help Bruce with this??
----- Original Message -----
From: "Bruce Sherwood" <bas@andrew.cmu.edu>
To: <visualpython-users@lists.sourceforge.net>
Sent: Friday, June 08, 2001 9:14 PM
Subject: [Visualpython-users] Advice?
> Can anyone give us advice on what changes there were in going from Python
> 2.0 to Python 2.1 that could lead to the following problem in Visual?
>
> The following code running on VPython 2.1 for Windows shows that p.color
is
> a Numeric array, but that it is not possible to assign a Numeric array to
> p.color. The problem evidently is in the C++ code for the Visual module,
> but in order to understand how to fix it it would be wonderful if someone
> happens to know what is changed in Python 2.1 (or Numeric) that would
> invalidate the Visual handling of assigning a Numeric array to a Visual
> object attribute. The existence of this bug is what is preventing us from
> releasing Visual for Python 2.1
>
> Bruce Sherwood
>
> from visual import *
> p = convex()
> print type(p.color)
> c = [.1, .2, .3]
> d = array(c)
> p.color = d
> print p.color
> ----------------------------------------
> <type 'array'>
> Traceback (innermost last)
> File "Untitled", line 6, in ?
> p.color = d
> TypeError: function not supported for these types, and can't coerce to
> supported types
>
> P.S. Attempting to assign p.color = p.color gives the same error.
>
>
> _______________________________________________
> Visualpython-users mailing list
> Visualpython-users@lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/visualpython-users