alsobe aware that the buffer size parameters only specify limit at which writes occur and do not necessarily set limit on internal resource use for examplewhen you do write(dataon buffered file fall of the bytes in data are first copied into the internal buffers if data represents very large byte arraythis copying will substantially increase the memory use of your program thusit is better to write large amounts of data in reasonably sized chunksnot all at once with single write(operation it should be noted that because the io module is relatively newthis behavior might be different in future versions text / the text / layer is used to process line-oriented character data the classes defined in this section build upon buffered / streams and add line-oriented processing as well as unicode character encoding and decoding all of the classes here inherit from textiobase textiowrapper(buffered [encoding [errors [newline [line_buffering]]]] class for buffered text stream buffered is buffered / as described in the previous section encoding is string such as 'asciior 'utf- that specifies the text encoding errors specifies the unicode error-handling policy and is 'strictby default (see "input and output,for descriptionnewline is the character sequence representing newline and may be none'''\ ''\ 'or '\ \nif none is giventhen universal newline mode is enabled in which any of the other line endings are translated into '\nwhen reading and os linesep is used as the newline on output if newline is one of the other valuesthen all '\ncharacters are translated into the specified newline on output line_buffering is flag that controls whether or not flush(operation is performed when any write operation contains the newline character by defaultthis is false an instance of textiowrapper supports all of the operations defined on iobase as well as the followingmethod description encoding errors line_buffering newlines the name of the text encoding being used encoding and decoding error handling policy flag that determines line buffering behavior nonea stringor tuple giving all of the different forms of newlines translated reads at most characters from the underlying stream and returns as string if is omittedthen this reads all available data to the end of file returns the empty string at eof the returned strings are decoded according to the encoding setting in encoding reads single line of text and returns as string returns an empty string at eof limit is the maximum number of bytes to read writes string to the underlying stream using the text encoding in encoding read([ ] readline([limit] write(sstringio([initial [encoding [errors [newline]]]]an in-memory file object with the same behavior as textiowrapper initial is string that specifies the initial contents of the file the other parameters have the same lib fl ff