nameoffnv / pywinauto

Automatically exported from code.google.com/p/pywinauto
Other
0 stars 0 forks source link

Python2.5  ImportError: No module named elementtree.ElementTree #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Mark

Please acknowledge it though it might be likely to be impolite because it is 
not good at English.

WriteToXML() & XMLHelpers.py() I try.
but Run result ImportError: No module named elementtree.ElementTree.

I read XMLHelpers src.

↓this module import is pthon 2.4 under
from elementtree.ElementTree import Element, SubElement, ElementTree
from cElementTree import Element, SubElement, ElementTree

but python 2.5 higher
from xml.etree.ElementTree import Element, SubElement, , ElementTree
from xml.etree.cElementTree import Element, SubElement, ElementTree

not Python 2.5?

Will you consider python 2.5?

Please say they might be able to be some cooperation.

Thank you.
Dai

---
Transferred from openqa JIRA
Resolution:     Fixed
Reporter:   Daisuke Yamashita

Original issue reported on code.google.com by mtnBikin...@gmail.com on 26 Aug 2010 at 2:22

GoogleCodeExporter commented 9 years ago
Mark Mc Mahon added a comment - 23/Mar/07 11:43 AM

Hi Dai-san,

Thanks for the error report - it was perfectly understandable.

I implemented a fix for this (revision 594). It first tries to import the 2.5 
version - and if that doesn't work it tries the external Elementree package. If 
that fails then the module fails to load (as this module HAS to have 
Elementtree.

Thanks
Mark

Original comment by mtnBikin...@gmail.com on 26 Aug 2010 at 2:23