diff options
Diffstat (limited to 'snakeoil/xml/__init__.py')
-rw-r--r-- | snakeoil/xml/__init__.py | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/snakeoil/xml/__init__.py b/snakeoil/xml/__init__.py deleted file mode 100644 index 4091f02..0000000 --- a/snakeoil/xml/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright: 2006 Brian Harring <ferringb@gmail.com> -# License: GPL2 - -""" -indirection to load ElementTree -""" -# essentially... prefer cElementTree, then 2.5 bundled, then -# elementtree, then 2.5 bundled, then our own bundled - -# "No name etree in module xml", "Reimport cElementTree" -# pylint: disable-msg=E0611,W0404 - -gotit = True -try: - import cElementTree as etree -except ImportError: - gotit = False -if not gotit: - try: - from xml.etree import cElementTree as etree - gotit = True - except ImportError: - pass -if not gotit: - try: - from elementtree import ElementTree as etree - gotit = True - except ImportError: - pass -if not gotit: - try: - from xml.etree import ElementTree as etree - gotit = True - except ImportError: - pass - -if not gotit: - from snakeoil.xml import bundled_elementtree as etree -del gotit - -def escape(string): - """ - simple escaping of &, <, and > - """ - return string.replace("&", "&").replace("<", "<").replace(">", - ">") |