[Martijn Faassen wrote] > I.e., this in ElementTree: > ... http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/475126 import ElementTree from everywhere try: import xml.etree.ElementTree as ET # in python >=2.5 except ImportError: try: import cElementTree as ET # effbot's C module except ImportError: try: import elementtree.ElementTree as ET # effbot's pure Python module except ImportError: try: import lxml.etree as ET # ElementTree API using libxml2 except ImportError: import warnings warning.warn("could not import ElementTree " "(http://effbot.org/zone/element-index.htm)") # Or you might just want to raise an ImportError here. # Use ET.Element, ET.ElementTree, etc... That is the current state. Trent -- Trent Mick TrentM at ActiveState.com
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4