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

Function get_inputhook_name_and_func

IPython/terminal/pt_inputhooks/__init__.py:124–140  ·  view source on GitHub ↗
(gui: str)

Source from the content-addressed store, hash-verified

122
123
124def get_inputhook_name_and_func(gui: str) -> Tuple[str, Callable]:
125 if gui in registered:
126 return gui, registered[gui]
127
128 if gui not in backends:
129 raise UnknownBackend(gui)
130
131 if gui in aliases:
132 return get_inputhook_name_and_func(aliases[gui])
133
134 gui_mod = gui
135 if gui.startswith("qt"):
136 gui = set_qt_api(gui)
137 gui_mod = "qt"
138
139 mod = importlib.import_module("IPython.terminal.pt_inputhooks." + gui_mod)
140 return gui, mod.inputhook

Callers 2

test_inputhook_qtFunction · 0.90
enable_guiMethod · 0.85

Calls 2

UnknownBackendClass · 0.85
set_qt_apiFunction · 0.85

Tested by 1

test_inputhook_qtFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…