(gui: str)
| 122 | |
| 123 | |
| 124 | def 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 |
searching dependent graphs…