[pypy-issue] [issue827] import xml.etree.cElementTree fails

Josh Ayers tracker at bugs.pypy.org
Fri Aug 12 04:07:56 CEST 2011

New submission from Josh Ayers <josh.ayers at gmail.com>:

import xml.etree.cElementTree fails on PyPy 1.5 (on Windows).

It attempts to import from _elementtree.pyd, which is located in Python27\DLLs
in the CPython distribution, but is not present in PyPy.

A simple fix is to modify pypy\lib-python\2.7\xml\etree\cElementTree.py.

Replace the line:
from _elementtree import *
from ElementTree import *

That will use the pure-Python version of ElementTree.  Based on some very
limited testing, performance under PyPy is not bad.

messages: 2920
nosy: jayers2003, pypy-issue
priority: bug
release: 1.5
status: unread
title: import xml.etree.cElementTree fails

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list