def _stop_timers(canvas):
 for attr in dir(canvas):
  try:
   attr_obj = getattr(canvas, attr)
  except NotImplementedError:
   attr_obj = None
  if isinstance(attr_obj, Timer):
   attr_obj.stop()

def _stop_timers ( canvas ) : for attr in dir ( canvas ) : try : attr_obj = getattr ( canvas , attr ) except NotImplementedError : attr_obj = None if isinstance ( attr_obj , Timer ) : attr_obj . stop ( )
stop all timers in a canvas .