Hi,

I have the following weird behavior when I load modules:


>>> import random
>>> print random.randrange(10)
8
>>>

Everything is fine.

>>> import random
>>> from numpy import *
>>>
>>> print random.randrange(10)
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute 'randrange'
>>>

Here it does not work.


>>> from numpy import *
>>> import random
>>>
>>> print random.randrange(10)
8
>>>

Now everything is back to normal.

That means the order the modules are loaded matters! I would expect
there is a problem with my installation because I guess this should
normally be independent of the loaded modules.

Here are my questions:
1. Does anyone has this behavior too?

2. How can I fix this problem?

I use linux with fedora core 6 and python 2.4.4

I appreciate any hint. Thanks!

Frank

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to