[NumPy-Tickets] [NumPy] #1704: Patch for utils.py lookfor()

NumPy Trac numpy-tickets@scipy....
Wed Mar 30 08:06:27 CDT 2011


#1704: Patch for utils.py  lookfor()
-------------------------+--------------------------------------------------
 Reporter:  sebhaase     |       Owner:  somebody    
     Type:  enhancement  |      Status:  needs_review
 Priority:  normal       |   Milestone:  Unscheduled 
Component:  Other        |     Version:  1.5.0       
 Keywords:               |  
-------------------------+--------------------------------------------------
Changes (by sebhaase):

  * status:  needs_work => needs_review


Comment:

 You could use this as a test.
 {{{
 >>> import numpy as np
 >>> import wx
 >>> np.lookfor('Bell', wx)
 Search results for 'bell'
 -------------------------
 wx.Bell
     Bell()
 wx.CheckBox
     A checkbox is a labelled box which by default is either on (the
 wx.Validator_SetBellOnError

 wx.PyValidator.SetBellOnError

 }}}
 wx is widely used, but big, so the command takes a few seconds on my
 machine.

 without the patch I get:
 {{{
 >>> import numpy as np
 >>> import wx
 >>> np.lookfor('window',wx)
 Traceback (most recent call last):
   File "<input>", line 1, in <module>
   File "/home/shaase/Priithon_27_lin64/numpy/lib/utils.py", line 748, in
 lookfor
     cache = _lookfor_generate_cache(module, import_modules, regenerate)
   File "/home/shaase/Priithon_27_lin64/numpy/lib/utils.py", line 933, in
 _lookfor_generate_cache
     mod_name = getattr(v, '__module__', None)
 NameError: Unknown C global variable
 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1704#comment:3>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list