[Numpy-discussion] The baffling behavior that just won't die

d_l_goldsmith at yahoo.com d_l_goldsmith at yahoo.com
Sun Jul 5 23:27:02 EDT 2009


Sorry for the cross post, but almost immediately after hitting send (to scipy-user) I realized this is the more appropriate list for the below. :-(

DG

Hi, folks.  I'm having a problem using numpy.lookfor() that is very reminiscent of this thread:

http://mail.scipy.org/pipermail/scipy-user/2008-June/017294.html

The simplest reproduction of the problem is illustrated thusly:

c:\Python25\Lib\site-packages\numpy>dir random.py
Volume in drive C is SQ004816V03
Volume Serial Number is 8E67-90B7

Directory of c:\Python25\Lib\site-packages\numpy

File Not Found

c:\Python25\Lib\site-packages\numpy>python
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> 'lookfor' in dir(np)
True
>>> help(np.lookfor)
cannot import name Random

And that's all she wrote. 

I read the thread cited above and it led me to examine the goings-on using python -v; as warned, there was a waterfall of imports, but at the end of it all was:
                 .
                 :
# C:\Python25\lib\repr.pyc matches C:\Python25\lib\repr.py
import repr # precompiled from C:\Python25\lib\repr.pyc
import collections # builtin
# C:\Python25\lib\tempfile.pyc matches C:\Python25\lib\tempfile.py
import tempfile # precompiled from C:\Python25\lib\tempfile.pyc
import random # directory random
# random\__init__.pyc matches random\__init__.py
import random # precompiled from random\__init__.pyc
# random\info.pyc matches random\info.py
import random.info # precompiled from random\info.pyc
import random.mtrand # dynamically loaded from random\mtrand.pyd
cannot import name Random

Please help.  Thanks!

DG




      



More information about the NumPy-Discussion mailing list