Commits

Luke Plant committed 3bbb13b

Removed unused code

Comments (0)

Files changed (2)

semanticeditor/utils/etree.py

 """
-ElementTree utils
+etree/ElementTree utils
 """
 
-from elementtree import ElementTree as ET
-from xml.parsers import expat
-
 # ElementTree utilities.  Lots of these are pinched
 # from proposed 'ElementLib' module on effbot.
 
     """
     return list(parent.getchildren()).index(elem)
 
-def wrap_elements_in_tag(parent, start_idx, stop_idx, tag):
-    """
-    Wrap elements in parent at indices [start_idx:stop_idx] with
-    a new element
-    """
-    newelem = ET.Element(tag)
-    group = parent[start_idx:stop_idx]
-    newelem[:] = group
-    parent[start_idx:stop_idx] = [newelem]
-    return newelem
-
 def indent(elem, level=0):
     i = "\n" + level*"  "
     if len(elem):

semanticeditor/utils/presentation.py

 from lxml import etree as ET
 from semanticeditor.utils.etree import cleanup, flatten, get_parent, get_depth, get_index, wrap_elements_in_tag, indent
 from semanticeditor.utils.datastructures import struct
-from xml.parsers import expat
 import re
 
 ### Errors ###