[XML-SIG] PyXML breaks localization

Uche Ogbuji uche.ogbuji@fourthought.com
Thu, 08 Aug 2002 09:07:20 -0600


> Hi everybody,
> I have just found that PyXML calls gettext.install() on import (via 
> dom/MessageSource.py), which means that simply calling:
> 
> import xml.dom
> 
> puts _() to your __builtin__ namespace. Even worse is, that previously 
> installed _() is overridden, thus breaking the localization of running app.
> Even if this is easy to fix by calling gettext.install() after xml.dom 
> was imported, it does not seem to me as a Good Thing(tm).
> 
> I think that the localization scheme of PyXML should be changed 
> according to http://python.org/doc/2.2.1/lib/node207.html in order not 
> to pollute the __builtin__ namespace.

I'll look into this.  I've wanted to touch up the l10n code, anyway.


-- 
Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Track chair, XML/Web Services One Boston: http://www.xmlconference.com/
Basic XML and RDF techniques for knowledge management, Part 7 - 
http://www-106.ibm.com/developerworks/xml/library/x-think12.html
Keeping pace with James Clark - http://www-106.ibm.com/developerworks/xml/libra
ry/x-jclark.html
Python and XML development using 4Suite, Part 3: 4RDF - 
http://www-105.ibm.com/developerworks/education.nsf/xml-onlinecourse-bytitle/8A
1EA5A2CF4621C386256BBB006F4CEC