I'm hesitant to resort to tricks like "import pyexpat before wx, so that symbols are loaded from the right library". Luckily, I stumbled onto pxdom. It's a pure-python DOM implementation, and switching to it was as easy as this: # import xml.dom.minidom as dom import pxdom as dom