[Tutor] pyexpat

Kent Johnson kent37 at tds.net
Tue Apr 18 14:27:06 CEST 2006


Andre Engels wrote:
> I am working for the Python Wikipediabot Framework
> (http://www.sourceforge.net/pywikipedia). A user noted me to an
> apparent deadlock in the XML parsing. I tried to get to the actual

That's pretty surprising, I wouldn't expect the parser to use any locks. 
Can you say more about the deadlock?

> parsing code to see what went wrong. The furthest I get, however, is
> in the feed() method of the class ExpatParser in expatreader.py. There
> is a line there:
> 
> self._parser.Parse(data, isFinal)
> 
> self._parser, as I have found, is an object of the class
> pyexpat.xmlparser, but I have no idea about where to fine pyexpat. Can
> anyone help me further?

pyexpat is written in C, you have to look at the Python source code. 
Download the source tarball or browse the Subversion repository online; 
pyexpat.c is here:
http://svn.python.org/view/python/trunk/Modules/pyexpat.c?rev=45449&view=auto

pyexpat is itself a wrapper around expat which is here:
http://svn.python.org/view/python/trunk/Modules/expat/

Kent



More information about the Tutor mailing list