Re: [opensuse-factory] python-elementtree in Factory
![](https://seccdn.libravatar.org/avatar/a8e628b656c2084e876abf8843e2b2a0.jpg?s=120&d=mm&r=g)
Hi,
I've noticed that python-elementtree was removed in Factory. Will it be returning?
Probably not, as it's now part of the standard library. # rpm -ql python-xml | grep -i elementtree /usr/lib/python2.5/xml/etree/ElementTree.py /usr/lib/python2.5/xml/etree/ElementTree.pyc /usr/lib/python2.5/xml/etree/ElementTree.pyo /usr/lib/python2.5/xml/etree/cElementTree.py /usr/lib/python2.5/xml/etree/cElementTree.pyc /usr/lib/python2.5/xml/etree/cElementTree.pyo
It's a very popular module that's used in a lot of Python projects, including osc.
Is it possible to fix these projects to use "import xml.etree" instead of "import elementtree"? Andreas Hanke -- "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: www.gmx.net/de/go/mailfooter/topmail-out --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/5737fc4e5d49301cffce52ab6b2f0fc1.jpg?s=120&d=mm&r=g)
On Friday 23 February 2007 2:36 pm, andreas.hanke@gmx-topmail.de wrote:
Hi,
I've noticed that python-elementtree was removed in Factory. Will it be returning?
Probably not, as it's now part of the standard library.
# rpm -ql python-xml | grep -i elementtree /usr/lib/python2.5/xml/etree/ElementTree.py /usr/lib/python2.5/xml/etree/ElementTree.pyc /usr/lib/python2.5/xml/etree/ElementTree.pyo /usr/lib/python2.5/xml/etree/cElementTree.py /usr/lib/python2.5/xml/etree/cElementTree.pyc /usr/lib/python2.5/xml/etree/cElementTree.pyo
The only problem is that it does not contain all of the functionality of the official release. It was renamed in this way so that they can coexist. It's kind of like python-xml vs. PyXML.
Is it possible to fix these projects to use "import xml.etree" instead of "import elementtree"?
You can do something like this: try: import xml.etree as elementtree except ImportError: try: import cElementTree as elementtree except ImportError: import elementtree -- James Oakley jfunk@funktronics.ca --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
participants (2)
-
andreas.hanke@gmx-topmail.de
-
James Oakley