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

NumPy Trac numpy-tickets@scipy....
Mon Jan 3 09:02:30 CST 2011


#1704: Patch for utils.py  lookfor()
-------------------------+--------------------------------------------------
 Reporter:  sebhaase     |       Owner:  somebody
     Type:  enhancement  |      Status:  new     
 Priority:  normal       |   Milestone:  1.5.2   
Component:  Other        |     Version:  1.5.0   
 Keywords:               |  
-------------------------+--------------------------------------------------
 lookfor chokes on SWIG globals vars
 e.g. wx module

 An easy patch is:
 /numpy/lib/utils.py
 928,933c928
 <                 try:
 <                     item_name = getattr(v, '__name__', "%s.%s" % (name,
 n))
 <                 except NameError:
 <                     # ref. SWIG's global cvars
 <                     #    NameError: Unknown C global variable
 <                     item_name = "%s.%s" % (name, n)
 ---
 >                 item_name = getattr(v, '__name__', "%s.%s" % (name, n))

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


More information about the NumPy-Tickets mailing list