|
22 | 22 | ] |
23 | 23 |
|
24 | 24 | # Splices a list of strings and file-like objects into a single stream |
25 | | -class ListStream: |
| 25 | +class ListStream(object): |
26 | 26 | def __init__(self, *args): |
27 | 27 | count = len(args) |
28 | 28 | if count == 0: |
@@ -57,7 +57,7 @@ def _next(self): |
57 | 57 | # A file-like interface that will convert a stream of XML fragments, into |
58 | 58 | # a well-formed XML document by injecting a root element into the stream. |
59 | 59 | # This is basically an annoying hack and I'd love a better idea. |
60 | | -class XMLStream: |
| 60 | +class XMLStream(object): |
61 | 61 | def __init__(self, file_): |
62 | 62 | self.file = XMLStream.prepare(file_) |
63 | 63 |
|
@@ -104,7 +104,7 @@ def read(self, size): |
104 | 104 | TAG = "TAG" # kind, name, attrs |
105 | 105 | END = "END" # kind, name |
106 | 106 | VAL = "VAL" # kind, value |
107 | | -class XMLReader: |
| 107 | +class XMLReader(object): |
108 | 108 | def __init__(self, stream): |
109 | 109 | self._items = pulldom.parse(XMLStream(stream), bufsize = 256) |
110 | 110 | self._item = None # The current item |
@@ -225,7 +225,7 @@ def read(self): |
225 | 225 | MESSAGE = "MESSAGE" |
226 | 226 | RESULT = "RESULT" |
227 | 227 | RESULTS = "RESULTS" |
228 | | -class ResultsReader: |
| 228 | +class ResultsReader(object): |
229 | 229 | """A forward-only, streaming search results reader.""" |
230 | 230 | def __init__(self, stream): |
231 | 231 | self._reader = XMLReader(stream) |
|
0 commit comments