[wxPython-dev] Bug in wx/_core.py about locale

Robin Dunn robin at alldunn.com
Wed Dec 6 14:46:36 PST 2006


Victor Stinner wrote:
> Hi,
> 
> Le Mardi 5 Décembre 2006 18:09, Robin Dunn a écrit :
>>> File "(...)\wx-2.7.2-msw-unicode\wx\_core.py", line 13684, in <module>
>>>    default = locale.getdefaultlocale()[1]
>>> AttributeError: 'module' object has no attribute 'getdefaultlocale'
>> Strange.  Which version of Python is being used?
> 
> Ooops, sorry. It was something very stupid.
> 
> I was a directory called 'locale' in PYTHONPATH but _without_ any 
> __init__.py... or any other ".py" file! Solution: remove it. Is it a 
> new "feature" of Python 2.5? :-/

In the alpha release Python would issue a warning if it found a 
non-package dir that matched the name of an import, but they took the 
warning out for the release.   (Although it might come back in the 
future.)  IIRC, I think it has something to do with proposed changes to 
the import semantics for Python 3000.


-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-dev mailing list