internallyeach file object keeps file pointer that stores the byte offset at which the next read or write operation will occur the tell(method returns the current value of the file pointer as long integer the seek(method is used to randomly access parts of file given an offset and placement rule in whence if whence is (the default)seek(assumes that offset is relative to the start of the fileif whence is the position is moved relative to the current positionand if whence is the offset is taken from the end of the file seek(returns the new value of the file pointer as an integer it should be noted that the file pointer is associated with the file object returned by open(and not the file itself the same file can be opened more than once in the same program (or in different programseach instance of the open file has its own file pointer that can be manipulated independently the fileno(method returns the integer file descriptor for file and is sometimes used in low-level / operations in certain library modules for examplethe fcntl module uses the file descriptor to provide low-level file control operations on unix systems file objects also have the read-only data attributes shown in table table file object attributes attribute description closed boolean value indicates the file statefalse if the file is opentrue if closed the / mode for the file name of the file if created using open(otherwiseit will be string indicating the source of the file boolean value indicating whether space character needs to be printed before another value when using the print statement classes that emulate files must provide writable attribute of this name that' initially initialized to zero (python onlywhen file is opened in universal newline modethis attribute contains the newline representation actually found in the file the value is none if no newlines have been encountereda string containing '\ ''\ 'or '\ \ 'or tuple containing all the different newline encodings seen string that indicates file encodingif any (for example'latin- or 'utf- 'the value is none if no encoding is being used mode name softspace newlines encoding standard inputoutputand error the interpreter provides three standard file objectsknown as standard inputstandard outputand standard errorwhich are available in the sys module as sys stdinsys stdoutand sys stderrrespectively stdin is file object corresponding to the stream of input characters supplied to the interpreter stdout is the file object that receives output produced by print stderr is file that receives error messages more often than notstdin is mapped to the user' keyboardwhereas stdout and stderr produce text onscreen lib fl ff