Ticket #42069: patch-drv_libxml2.py.diff
File patch-drv_libxml2.py.diff, 851 bytes (added by zpeeters@…, 11 years ago) |
---|
-
drv_libxml2.py
old new 1 # -*- coding: iso-8859-1-*-1 # -*- coding: utf-8 -*- 2 2 """ A SAX2 driver for libxml2, on top of it's XmlReader API 3 3 4 4 USAGE … … 34 34 35 35 """ 36 36 37 __author__ = u"Stéphane Bidoul <sbi@skynet.be>"37 __author__ = "Stéphane Bidoul <sbi@skynet.be>" 38 38 __version__ = "0.3" 39 39 40 40 import codecs 41 from types import StringType, UnicodeType 42 StringTypes = ( StringType,UnicodeType)41 import builtins 42 StringTypes = (builtins.str) 43 43 44 44 from xml.sax._exceptions import * 45 45 from xml.sax import xmlreader, saxutils … … 65 65 66 66 try: 67 67 import libxml2 68 except ImportError ,e:68 except ImportError as e: 69 69 raise SAXReaderNotAvailable("libxml2 not available: " \ 70 70 "import error was: %s" % e) 71 71