module error for elementtree

Stefan Behnel stefan.behnel-n05pAM at web.de
Fri May 11 07:48:30 EDT 2007


saif.shakeel at gmail.com wrote:
> On May 11, 12:22 pm, half.ital... at gmail.com wrote:
>> 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/e09...
>>
>> Read carefully.- Hide quoted text -
>>
>> - Show quoted text -
> 
> The commands are given in that link are more so for a linux system .I
> am developing in windows.how should i go about to make it work

As said: read carefully.

Stefan



More information about the Python-list mailing list