#NEWLINE# def wait( self , timeout = None ) : #NEWLINE# #INDENT# self . _Event__cond . acquire ( ) #NEWLINE# try : #NEWLINE# #INDENT# if ( not self . _Event__flag ) : #NEWLINE# #INDENT# self . _Event__cond . wait ( self ) #NEWLINE# #UNINDENT# return self . _Event__flag #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# self . _Event__cond . release ( )