module error for elementtree
Jerry Hill
malaclypse2 at gmail.com
Fri May 11 09:12:34 EDT 2007
On 11 May 2007 00:05:19 -0700, saif.shakeel at gmail.com
<saif.shakeel at gmail.com> wrote:
> For the above code to work elementtree is
> imported in first line ,but when running it says :
> ImportError: No module named elementtree.ElementTree
> Does thie module exists as default or a patch is needed?
That depends on which version of Python you are running. Starting
with 2.5, ElementTree was moved into the standard library, as part of
the xml package. If you're using an older version of python, I think
you'll need to download and install the elementtree package from
http://effbot.org/zone/element-index.htm
Assuming you're using python 2.5, you probably want something like this:
from xml.etree.ElementTree import ElementTree as et
--
Jerry
More information about the Python-list
mailing list