#NEWLINE# def seek( self , pos , whence = 0 ) : #NEWLINE# #INDENT# if ( not ( 0 <= whence <= 2 ) ) : #NEWLINE# #INDENT# raise ValueError ( 'invalid whence' ) #NEWLINE# #UNINDENT# with self . _write_lock : #NEWLINE# #INDENT# self . _flush_unlocked ( ) #NEWLINE# return _BufferedIOMixin . seek ( self , pos , whence )