def _stop(evt):
 try:
  evt.stop()
 except AttributeError as e:
  evt.cancel()

def _stop ( evt ) : try : evt . stop ( ) except AttributeError as e : evt . cancel ( )
simple wrapper for stopping an event .