def is_event_loop_running(app=None):
 if (app is None):
  app = init_qtapp()
 if hasattr(app, '_in_event_loop'):
  return app._in_event_loop
 else:
  return False

def is_event_loop_running ( app = None ) : if ( app is None ) : app = init_qtapp ( ) if hasattr ( app , '_in_event_loop' ) : return app . _in_event_loop else : return False
return true if event loop is running .