def logAttrib(obj, log, attrib, value=None):
 if (log or ((log is None) and obj.autoLog)):
  if (value is None):
   value = getattr(obj, attrib)
  message = ('%s: %s = %s' % (obj.name, attrib, value.__repr__()))
  try:
   obj.win.logOnFlip(message, level=logging.EXP, obj=obj)
  except AttributeError:
   logging.log(message, level=logging.EXP, obj=obj)

def logAttrib ( obj , log , attrib , value = None ) : if ( log or ( ( log is None ) and obj . autoLog ) ) : if ( value is None ) : value = getattr ( obj , attrib ) message = ( '%s: %s = %s' % ( obj . name , attrib , value . __repr__ ( ) ) ) try : obj . win . logOnFlip ( message , level = logging . EXP , obj = obj ) except AttributeError : logging . log ( message , level = logging . EXP , obj = obj )
logs a change of a visual attribute on the next window .