module error for elementtree
half.italian at gmail.com
half.italian at gmail.com
Fri May 11 03:22:35 EDT 2007
On May 11, 12:05 am, saif.shak... at gmail.com wrote:
> #!/usr/bin/env python
>
> from elementtree import ElementTree as Element
> tree = et.parse("testxml.xml")
>
> for t in tree.getiterator("SERVICEPARAMETER"):
> if t.get("Semantics") == "localId":
> t.set("Semantics", "dataPackageID")
>
> tree.write("output.xml")
>
> Hi,
> 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?
> Thanks
http://groups.google.com/group/comp.lang.python/browse_frm/thread/e095cc79d1efb99/a4523a6e9b7061af?rnum=1#a4523a6e9b7061af
Read carefully.
More information about the Python-list
mailing list