Hi Florent,

> I was written with python 2.4 in mind. Either install cElementTree
> manually or propose a patch to do this:
>
> at line 14 in tgwebservices/controllers.py
>
> instead of
>
> import cElementTree as et
>
> do:
>
> try:
>     # python 2.5 way of life :)
>     import xml.etree.cElementTree as et
> except:
>     # python 2.4
>     import cElementTree as et
>
> you may have to do this in some other modules also. This comes from the
> fact that elementtree was integrated in the standard python library
> under the new xml.etree namespace.

I've already replaced "import cElementTree as et" by "import
xml.etree.cElementTree as et" at tgwebservices/controllers.py and
tgwebservices/soap.py. Now I get this error when importing anything
from tgwebservices:

>>> from tgwebservices.controllers import WebServicesRoot
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/TGWebServices-1.1.2-py2.5.egg/
tgwebservices/controllers.py", line 14, in <module>
    import xml.etree.cElementTree as et
ImportError: No module named etree.cElementTree

However, if I try to import cElementTree from the interpreter, it
works:

>>> import xml.etree.cElementTree as et
>>> dir(et)
['Comment', 'Element', 'ElementPath', 'ElementTree', 'PI',
'ProcessingInstruction', 'QName', 'SubElement', 'TreeBuilder',
'VERSION', 'XML', 'XMLID', 'XMLParser', 'XMLParserError',
'XMLTreeBuilder', '__builtins__', '__doc__', '__file__', '__name__',
'dump', 'fromstring', 'iselement', 'iterparse', 'parse', 'tostring']

Any idea? Should I report it for a patch to be added?

Best,

--
VĂ­ctor Peinado




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to