[wxPython] wxPython modifying string.lowercase!?

Is the

from wxPython.wx import *

command supposed to modify string.lowercase?

Before this command, string.lowercase contains a-z. Afterwards, it includes an additional 36 characters:

Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import string
>>> string.lowercase
'abcdefghijklmnopqrstuvwxyz'
>>> from wxPython.wx import *
>>> string.lowercase
'abcdefghijklmnopqrstuvwxyz\203\232\234\236\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\370\371\372\373\374\375\376\377'
>>>

with the octal characters corresponding to various lowercase accented characters.

I'm using wxPython-2.3.2.1-Py15-hybrid with Python 1.5.2 on Win98SE.

I don't remember if this happened with earlier versions of wxPython. It seems to me that wxPython shouldn't alter the contents of standard modules. If it needs a version of string.lowercase including accented characters, it should define a new variable to hold it.

David Fox

Is the

from wxPython.wx import *

command supposed to modify string.lowercase?

Nope, but it's not strickly wxPython that doing is it, but the locale
module. wx.py has this code in it:

try:
    import locale
    locale.setlocale(locale.LC_ALL, "")
except:
    pass

This is done so the Python settings for the locale will match what wxGTK
does at the C level when the module is imported.

ยทยทยท

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