Jc schrieb:
> Thanks for this guys, I guess I should have looked into it a bit harder.
> Any opinions on the cleanest way to support 2.4 (+python-elementtree)
> and 2.5?
please have a look at the bzr package:
try:
try:
# it's in this package in python2.5
from xml.etree.cElementTree import (ElementTree, SubElement,
Element,
XMLTreeBuilder, fromstring, tostring)
import xml.etree as elementtree
except ImportError:
from cElementTree import (ElementTree, SubElement, Element,
XMLTreeBuilder, fromstring, tostring)
import elementtree
ParseError = SyntaxError
except ImportError:
mutter('WARNING: using slower ElementTree; consider installing
cElementTree'
" and make sure it's on your PYTHONPATH")
# this copy is shipped with bzr
from util.elementtree.ElementTree import (ElementTree, SubElement,
Element, XMLTreeBuilder,
fromstring, tostring)
import util.elementtree as elementtree
--
python-elementree doesn't seem to support python2.5?
https://launchpad.net/bugs/81890
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs