cElementTree
is the fast, C implementation of the XML API ElementTree
. In python 2 you would load it explicitly (aliasing it to ElementTree
), but in the Python 3 docs I read this:
Changed in version 3.3: This module will use a fast implementation whenever available. The xml.etree.cElementTree module is deprecated.
Indeed, xml.etree.cElementTree.py
now simply imports from xml.etree.ElementTree
. The question: How do I get access to the "fast implementation"? How do I tell if it's "available", and where do I get it from if for some reason it's not distributed with python?
Introspection on ElementTree
in my program suggests that I'm getting the python version. In ElementTree.py
, I didn't spot any hooks to the C version. When and how does it come into play? The ElementTree
documentation offered no clues, and neither did a quick search on google and stackoverflow.