def inputhook(context):
 NSApp = _NSApp()
 _stop_on_read(context.fileno())
 msg(NSApp, n('run'))
 if (not _triggered.is_set()):
  CoreFoundation.CFRunLoopRun()

def inputhook ( context ) : NSApp = _NSApp ( ) _stop_on_read ( context . fileno ( ) ) msg ( NSApp , n ( 'run' ) ) if ( not _triggered . is_set ( ) ) : CoreFoundation . CFRunLoopRun ( )
run the pyglet event loop by processing pending events only .