You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

19 lines
470 B

from sys import version_info
try:
# noinspection PyPackageRequirements
from lxml import etree
is_lxml = True
except ImportError:
is_lxml = False
etree = None
if 2 == version_info[0]:
try:
# noinspection PyPep8Naming
import xml.etree.cElementTree as etree
except ImportError:
etree = None
if not is_lxml and not etree:
# noinspection PyPep8Naming
import xml.etree.ElementTree as etree