MCPcopy
hub / github.com/prompt-toolkit/ptpython / _load_start_paths

Method _load_start_paths

src/ptpython/repl.py:90–100  ·  view source on GitHub ↗

Start the Read-Eval-Print Loop.

(self)

Source from the content-addressed store, hash-verified

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:

Callers 1

__init__Method · 0.95

Calls 3

readMethod · 0.80
get_globalsMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected