version 1.1.1.1, 2012/02/21 23:38:00
|
version 1.1.1.1.4.1, 2014/06/15 20:01:54
|
Line 34 TODO
|
Line 34 TODO
|
|
|
""" |
""" |
|
|
__author__ = u"Stéphane Bidoul <sbi@skynet.be>" | __author__ = "Stéphane Bidoul <sbi@skynet.be>" |
__version__ = "0.3" |
__version__ = "0.3" |
|
|
|
import sys |
import codecs |
import codecs |
from types import StringType, UnicodeType |
|
StringTypes = (StringType,UnicodeType) |
|
|
|
|
if sys.version < "3": |
|
__author__ = codecs.unicode_escape_decode(__author__)[0] |
|
|
|
from types import StringType, UnicodeType |
|
StringTypes = (StringType,UnicodeType) |
|
|
|
else: |
|
StringTypes = (str) |
|
|
from xml.sax._exceptions import * |
from xml.sax._exceptions import * |
from xml.sax import xmlreader, saxutils |
from xml.sax import xmlreader, saxutils |
from xml.sax.handler import \ |
from xml.sax.handler import \ |
Line 65 def _d(s):
|
Line 73 def _d(s):
|
|
|
try: |
try: |
import libxml2 |
import libxml2 |
except ImportError, e: | except ImportError as e: |
raise SAXReaderNotAvailable("libxml2 not available: " \ |
raise SAXReaderNotAvailable("libxml2 not available: " \ |
"import error was: %s" % e) |
"import error was: %s" % e) |
|
|