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

advertisement logo

 

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.


Share this post

Tags: , , , , , , , , , ,

Keep updated with the latest posts, be a part of over 1,000 subscribers! : email iconSubscribe to your email

Leave a Comment

Subscribe by email

Enter your Email