Add ptpython built-ins to global namespace.
(self)
| 405 | output.flush() |
| 406 | |
| 407 | def _add_to_namespace(self) -> None: |
| 408 | """ |
| 409 | Add ptpython built-ins to global namespace. |
| 410 | """ |
| 411 | globals = self.get_globals() |
| 412 | |
| 413 | # Add a 'get_ptpython', similar to 'get_ipython' |
| 414 | def get_ptpython() -> PythonInput: |
| 415 | return self |
| 416 | |
| 417 | globals["get_ptpython"] = get_ptpython |
| 418 | globals["exit"] = exit() |
| 419 | |
| 420 | def _remove_from_namespace(self) -> None: |
| 421 | """ |
no test coverage detected