MCPcopy Create free account
hub / github.com/ipython/ipython / inputhook

Function inputhook

IPython/terminal/pt_inputhooks/osx.py:127–137  ·  view source on GitHub ↗

Inputhook for Cocoa (NSApp)

(context)

Source from the content-addressed store, hash-verified

125
126
127def inputhook(context):
128 """Inputhook for Cocoa (NSApp)"""
129 NSApp = _NSApp()
130 _stop_on_read(context.fileno())
131 msg(NSApp, n('run'))
132 if not _triggered.is_set():
133 # app closed without firing callback,
134 # probably due to last window being closed.
135 # Run the loop manually in this case,
136 # since there may be events still to process (#9734)
137 CoreFoundation.CFRunLoopRun()

Callers

nothing calls this directly

Calls 3

_NSAppFunction · 0.85
_stop_on_readFunction · 0.85
nFunction · 0.85

Tested by

no test coverage detected