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:34–50  ·  view source on GitHub ↗
(gui)

Source from the content-addressed store, hash-verified

32 ', '.join(backends + sorted(registered)))
33
34def get_inputhook_name_and_func(gui):
35 if gui in registered:
36 return gui, registered[gui]
37
38 if gui not in backends:
39 raise UnknownBackend(gui)
40
41 if gui in aliases:
42 return get_inputhook_name_and_func(aliases[gui])
43
44 gui_mod = gui
45 if gui == 'qt5':
46 os.environ['QT_API'] = 'pyqt5'
47 gui_mod = 'qt'
48
49 mod = importlib.import_module('IPython.terminal.pt_inputhooks.'+gui_mod)
50 return gui, mod.inputhook

Callers 1

enable_guiMethod · 0.85

Calls 1

UnknownBackendClass · 0.85

Tested by

no test coverage detected