def captureWarnings(capture):
 global _warnings_showwarning
 if capture:
  if (_warnings_showwarning is None):
   _warnings_showwarning = warnings.showwarning
   warnings.showwarning = _showwarning
 elif (_warnings_showwarning is not None):
  warnings.showwarning = _warnings_showwarning
  _warnings_showwarning = None

def captureWarnings ( capture ) : global _warnings_showwarning if capture : if ( _warnings_showwarning is None ) : _warnings_showwarning = warnings . showwarning warnings . showwarning = _showwarning elif ( _warnings_showwarning is not None ) : warnings . showwarning = _warnings_showwarning _warnings_showwarning = None
if capture is true .