From: Guy K. K. <g....@ma...> - 2010-04-08 02:29:35
|
On Thu, 08 Apr 2010 14:16:00 Ron Adam wrote: > On a different note: > > I came across something which was just a minor annoyance, but maybe worth > fixing. > > ra@Gutsy:~$ python > Python 2.6.5 (r265:79063, Apr 3 2010, 01:56:30) > [GCC 4.4.3] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import random > >>> from visual import * > >>> random.choice(range(7)) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > AttributeError: 'module' object has no attribute 'choice' > >>> import random > >>> random.choice(range(7)) > 6 I wouldn't bet on it, but I could imagine that this has got something to do with the wild card imports within visual from numpy as well as certain other modules. I've voted for some cleaning and sanity in there, and I hope that's going to happen some day. Guy -- Guy K. Kloss Institute of Information and Mathematical Sciences Te Kura Pūtaiao o Mōhiohio me Pāngarau Massey University, Albany (North Shore City, Auckland) 473 State Highway 17, Gate 1, Mailroom, Quad B Building voice: +64 9 414-0800 ext. 9266 fax: +64 9 441-8181 G....@ma... http://www.massey.ac.nz/~gkloss |