Lines Matching refs:stream
200 useful for extensions that filter a stream.
301 """The iterator for tokenstreams. Iterate over the stream
305 def __init__(self, stream):
306 self.stream = stream
312 token = self.stream.current
314 self.stream.close()
316 next(self.stream)
322 """A token stream is an iterable that yields :class:`Token`\\s. The
346 """Are we at the end of the stream?"""
350 """Push a token back to the stream."""
393 """Close the stream."""
614 """Calls tokeniter + tokenize and wraps it in a token stream."""
615 stream = self.tokeniter(source, name, filename, state)
616 return TokenStream(self.wrap(stream, name, filename), name, filename)
618 def wrap(self, stream, name=None, filename=None):
619 """This is called with the stream as returned by `tokenize` and wraps
622 for lineno, token, value in stream: