MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _run_python

Function _run_python

paperflow/cli.py:49–60  ·  view source on GitHub ↗

Run a project-internal Python script and stream its output.

(script: Path, *args: str)

Source from the content-addressed store, hash-verified

47
48
49def _run_python(script: Path, *args: str) -> int:
50 """Run a project-internal Python script and stream its output."""
51 cmd = [sys.executable, str(script), *args]
52 env = os.environ.copy()
53 existing_pythonpath = env.get("PYTHONPATH")
54 paths = [str(PROJECT_ROOT)]
55 if existing_pythonpath:
56 paths.append(existing_pythonpath)
57 env["PYTHONPATH"] = os.pathsep.join(paths)
58 typer.echo(f"$ {' '.join(cmd)}")
59 completed = subprocess.run(cmd, cwd=str(PROJECT_ROOT), env=env)
60 return completed.returncode
61
62
63def _run_wiki(*args: str) -> int:

Callers 9

_run_wikiFunction · 0.85
initFunction · 0.85
doctorFunction · 0.85
profileFunction · 0.85
dailyFunction · 0.85
readFunction · 0.85
feedbackFunction · 0.85
guiFunction · 0.85
evalFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected