[Python-Dev] Sharing expat instances
Fredrik Lundh
fredrik at pythonware.com
Tue Dec 13 23:17:26 CET 2005
I wrote:
> 1. add an Include/pyexpat.h header file which contains a structure
> similar to the following:
> 2. during pyexpat initialization, initialize all members of this structure, and
> make it available as a PyCObject:
> 3. in cElementTree (or _elementtree, or whatever the python version will
> be named), import pyexpat, fetch the object, and verify
> 4. in cElementTree (...), do all expat calls via the dispatch table.
I've fixed all this, and checked in 1 and 2.
the remaining issue is how to include cElementTree. the current stand-
alone distribution consists of a single cElementTree module, which is in-
stalled under site-packages, as usual.
to avoid collisions, it's probably best to install the bundled version under
xml.etree, but how do you do that for a C module ?
my current idea is to
1. include it under a different name (_elementtree.so)
2. add a cElementTree.py under xml.etree, which simply does
from _elementtree import *
does anyone have a better idea ?
</F>
More information about the Python-Dev
mailing list