Lines Matching refs:stream

348     def __init__(self, stream, errors='strict'):
352 stream must be a file-like object open for writing.
370 self.stream = stream
375 """ Writes the object's contents encoded to self.stream.
378 self.stream.write(data)
382 """ Writes the concatenated list of strings to the stream
394 stream to recover state.
400 self.stream.seek(offset, whence)
407 """ Inherit all other methods from the underlying stream.
409 return getattr(self.stream, name)
415 self.stream.close()
423 def __init__(self, stream, errors='strict'):
427 stream must be a file-like object open for reading.
441 self.stream = stream
453 """ Decodes data from the stream self.stream and returns the
476 on the stream, these should be read too.
496 newdata = self.stream.read()
498 newdata = self.stream.read(size)
533 """ Read one line from the input stream and return the
561 # be a "\n") to get a proper line ending. If the stream is
608 """ Read all lines available on the input stream
625 Note that no stream repositioning should take place.
635 """ Set the input stream's current position.
639 self.stream.seek(offset, whence)
644 """ Return the next decoded line from the input stream."""
656 """ Inherit all other methods from the underlying stream.
658 return getattr(self.stream, name)
664 self.stream.close()
681 def __init__(self, stream, Reader, Writer, errors='strict'):
685 stream must be a Stream-like object.
694 self.stream = stream
695 self.reader = Reader(stream, errors)
696 self.writer = Writer(stream, errors)
713 """ Return the next decoded line from the input stream."""
733 self.stream.seek(offset, whence)
741 """ Inherit all other methods from the underlying stream.
743 return getattr(self.stream, name)
751 self.stream.close()
764 written to the underlying stream using an instance of the provided
767 In the other direction, data is read from the underlying stream using
775 def __init__(self, stream, encode, decode, Reader, Writer,
781 work on the backend (the data in stream).
786 stream must be a file-like object.
796 self.stream = stream
799 self.reader = Reader(stream, errors)
800 self.writer = Writer(stream, errors)
826 """ Return the next decoded line from the input stream."""
859 """ Inherit all other methods from the underlying stream.
861 return getattr(self.stream, name)
867 self.stream.close()