(self, *a, **kw)
| 229 | """ |
| 230 | |
| 231 | def __init__(self, *a, **kw): |
| 232 | vi_mode = kw.pop("vi_mode", False) |
| 233 | history_filename = kw.pop("history_filename", None) |
| 234 | configure = kw.pop("configure", None) |
| 235 | title = kw.pop("title", None) |
| 236 | |
| 237 | # Don't ask IPython to confirm for exit. We have our own exit prompt. |
| 238 | self.confirm_exit = False |
| 239 | |
| 240 | super().__init__(*a, **kw) |
| 241 | |
| 242 | def get_globals(): |
| 243 | return self.user_ns |
| 244 | |
| 245 | python_input = IPythonInput( |
| 246 | self, |
| 247 | get_globals=get_globals, |
| 248 | vi_mode=vi_mode, |
| 249 | history_filename=history_filename, |
| 250 | ) |
| 251 | |
| 252 | if title: |
| 253 | python_input.terminal_title = title |
| 254 | |
| 255 | if configure: |
| 256 | configure(python_input) |
| 257 | python_input.prompt_style = "ipython" # Don't take from config. |
| 258 | |
| 259 | self.python_input = python_input |
| 260 | |
| 261 | def prompt_for_code(self) -> str: |
| 262 | try: |
nothing calls this directly
no test coverage detected