Start the Read-Eval-Print Loop.
(self)
| 88 | self._load_start_paths() |
| 89 | |
| 90 | def _load_start_paths(self) -> None: |
| 91 | "Start the Read-Eval-Print Loop." |
| 92 | if self._startup_paths: |
| 93 | for path in self._startup_paths: |
| 94 | if os.path.exists(path): |
| 95 | with open(path, "rb") as f: |
| 96 | code = compile(f.read(), path, "exec") |
| 97 | exec(code, self.get_globals(), self.get_locals()) |
| 98 | else: |
| 99 | output = self.app.output |
| 100 | output.write(f"WARNING | File not found: {path}\n\n") |
| 101 | |
| 102 | def run_and_show_expression(self, expression: str) -> None: |
| 103 | try: |
no test coverage detected