Commit 2def11a9 authored by Neal Norwitz's avatar Neal Norwitz

Use *absolute* imports now that they are required. (Should this go into 2.5?)

parent c3e54b84
...@@ -19,11 +19,11 @@ xmlreader -- Base classes and constants which define the SAX 2 API for ...@@ -19,11 +19,11 @@ xmlreader -- Base classes and constants which define the SAX 2 API for
expatreader -- Driver that allows use of the Expat parser with SAX. expatreader -- Driver that allows use of the Expat parser with SAX.
""" """
from xmlreader import InputSource from .xmlreader import InputSource
from handler import ContentHandler, ErrorHandler from .handler import ContentHandler, ErrorHandler
from _exceptions import SAXException, SAXNotRecognizedException, \ from ._exceptions import (SAXException, SAXNotRecognizedException,
SAXParseException, SAXNotSupportedException, \ SAXParseException, SAXNotSupportedException,
SAXReaderNotAvailable SAXReaderNotAvailable)
def parse(source, handler, errorHandler=ErrorHandler()): def parse(source, handler, errorHandler=ErrorHandler()):
......
...@@ -4,8 +4,8 @@ convenience of application and driver writers. ...@@ -4,8 +4,8 @@ convenience of application and driver writers.
""" """
import os, urlparse, urllib, types import os, urlparse, urllib, types
import handler from . import handler
import xmlreader from . import xmlreader
try: try:
_StringTypes = [types.StringType, types.UnicodeType] _StringTypes = [types.StringType, types.UnicodeType]
......
"""An XML Reader is the SAX 2 name for an XML parser. XML Parsers """An XML Reader is the SAX 2 name for an XML parser. XML Parsers
should be based on this code. """ should be based on this code. """
import handler from . import handler
from _exceptions import SAXNotSupportedException, SAXNotRecognizedException from ._exceptions import SAXNotSupportedException, SAXNotRecognizedException
# ===== XMLREADER ===== # ===== XMLREADER =====
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment