Ubuntu Hardy Python XML error bugfix – xml.dom.ext

This was brought to my attention when I’m working on a python code to parse xml documents. I found out that in Ubuntu Hardy, the python-xml package has moved xml.dom.ext.* package to /usr/lib/python2.5/site-packages/oldxml thus breaking python code which depended on python-xml.

One way to work around this bug is to append :

sys.path.append('/usr/lib/python%s/site-packages/oldxml' % sys.version[:3])

just before you import stuff from xml.dom.ext.*. Hope that would help you.