Orbits
1
|
Public Member Functions | |
def | __init__ |
def | read |
def | readline |
def | readlines |
def | next |
def | __iter__ |
def | write |
def | writelines |
def | reset |
def | seek |
def | __getattr__ |
def | __enter__ |
def | __exit__ |
Public Attributes | |
stream | |
reader | |
writer | |
errors | |
Static Public Attributes | |
string | encoding = 'unknown' |
StreamReaderWriter instances allow wrapping streams which work in both read and write modes. The design is such that one can use the factory functions returned by the codec.lookup() function to construct the instance.
def codecs.StreamReaderWriter.__init__ | ( | self, | |
stream, | |||
Reader, | |||
Writer, | |||
errors = 'strict' |
|||
) |
Creates a StreamReaderWriter instance. stream must be a Stream-like object. Reader, Writer must be factory functions or classes providing the StreamReader, StreamWriter interface resp. Error handling is done in the same way as defined for the StreamWriter/Readers.
def codecs.StreamReaderWriter.__enter__ | ( | self | ) |
def codecs.StreamReaderWriter.__exit__ | ( | self, | |
type, | |||
value, | |||
tb | |||
) |
def codecs.StreamReaderWriter.__getattr__ | ( | self, | |
name, | |||
getattr = getattr |
|||
) |
Inherit all other methods from the underlying stream.
def codecs.StreamReaderWriter.__iter__ | ( | self | ) |
def codecs.StreamReaderWriter.next | ( | self | ) |
Return the next decoded line from the input stream.
def codecs.StreamReaderWriter.read | ( | self, | |
size = -1 |
|||
) |
def codecs.StreamReaderWriter.readline | ( | self, | |
size = None |
|||
) |
def codecs.StreamReaderWriter.readlines | ( | self, | |
sizehint = None |
|||
) |
def codecs.StreamReaderWriter.reset | ( | self | ) |
def codecs.StreamReaderWriter.seek | ( | self, | |
offset, | |||
whence = 0 |
|||
) |
def codecs.StreamReaderWriter.write | ( | self, | |
data | |||
) |
def codecs.StreamReaderWriter.writelines | ( | self, | |
list | |||
) |
|
static |
codecs.StreamReaderWriter.errors |
codecs.StreamReaderWriter.reader |
codecs.StreamReaderWriter.stream |
codecs.StreamReaderWriter.writer |
Copyright 2014 Google Inc. All rights reserved.