Lines Matching refs:file
352 stream must be a file-like object open for writing.
427 stream must be a file-like object open for reading.
678 # Optional attributes set by the file wrappers below
771 # Optional attributes set by the file wrappers below
786 stream must be a file-like object.
873 """ Open an encoded file using the given mode and return
883 The default file mode is 'r', meaning to open the file in read mode.
886 file.
896 The returned wrapped file object provides an extra attribute
904 # Force opening of the file in binary mode
906 file = builtins.open(filename, mode, buffering)
908 return file
912 srw = StreamReaderWriter(file, info.streamreader, info.streamwriter, errors)
917 file.close()
920 def EncodedFile(file, data_encoding, file_encoding=None, errors='strict'):
922 """ Return a wrapped version of file which provides transparent
925 Data written to the wrapped file is decoded according
927 file using file_encoding. The intermediate data type
930 Bytes read from the file are decoded using file_encoding and then
939 The returned wrapped file object provides two extra attributes
949 sr = StreamRecoder(file, data_info.encode, data_info.decode,