#NEWLINE# def seek( self , offset , whence = os . SEEK_SET ) : #NEWLINE# #INDENT# 'Seeks an offset within the file-like object.\n\n    Args:\n      offset: the offset to seek.\n      whence: optional value that indicates whether offset is an absolute\n              or relative position within the file.\n\n    Raises:\n      IOError: if the seek failed.\n    ' #NEWLINE# if ( not self . _is_open ) : #NEWLINE# #INDENT# raise IOError ( 'Not opened.' ) #NEWLINE# #UNINDENT# self . _file_object . seek ( offset , whence )