vis-language-python — a managed Python REPL exposed through the generic language facade (repl / repl_eval / repl_stop). Activates only when the workspace looks like a Python project. The REPL is a subprocess on a project-aware interpreter (uv / poetry / .venv / python3), registered as a session resource so it shows in ctx + the footer and is stoppable by id.
vis-language-python — a managed Python REPL exposed through the generic language facade (repl / repl_eval / repl_stop). Activates only when the workspace looks like a Python project. The REPL is a subprocess on a project-aware interpreter (uv / poetry / .venv / python3), registered as a session resource so it shows in ctx + the footer and is stoppable by id.
(py-repl-eval-fn env arg)repl_eval handler for Python. Accepts a code string or
{code, dir, timeout_ms}. Requires a running REPL for the dir, then evaluates
with globals persistent across calls.
repl_eval handler for Python. Accepts a code string or
`{code, dir, timeout_ms}`. Requires a running REPL for the dir, then evaluates
with globals persistent across calls.(py-start-repl-fn env op opts)repl handler for Python. Positional op (default "start") + opts
{dir, id}. Lifecycle: start / stop / status — there is NO restart (stop,
then start). op arrives as a
STRING from the model (strings-only boundary) — dispatch on it, no keyword
minting.
repl handler for Python. Positional `op` (default "start") + opts
`{dir, id}`. Lifecycle: start / stop / status — there is NO restart (stop,
then start). `op` arrives as a
STRING from the model (strings-only boundary) — dispatch on it, no keyword
minting.(py-test-fn env arg)run_tests handler for Python. Two execution environments:
test_*.py /
*_test.py under {paths} (default: the project's declared pytest
testpaths, else tests/ if present, else the run's cwd) and runs
each in a TRUSTED GraalPy context via the built-in pytest shim.
{paths} entries may be FILES or dirs, resolve against cwd, must
exist, and discovering nothing is NOT a pass. It runs whole FILES and
has no test-name filter, so a <path>::<test-name> node id is REFUSED
here (pointing at {environment "project"}) rather than quietly
running every test in the file. The project's declared
import roots (a src layout) are on sys.path; installed third-party
deps are NOT visible. When that layout could not be READ, the result
carries a warning instead of quietly claiming the project has none.{environment "project"} shells the project interpreter's pytest
(the argv pinned as python.interpreter, else uv/poetry/.venv/
python3 -m pytest <paths>) so installed test dependencies are
visible. Node ids go straight through as pytest's own
file.py::test_name, and a PATHLESS ::test_name becomes -k.
BOTH backends name their faults: every failing/erroring test comes back in
ONE failures list as {ns test type message file line}, type telling a
thrown "error" from a false-assertion "fail" (the project backend
reads pytest's own --junitxml report), and output carries the transcript
capped in the middle behind a marker that says how much it dropped.
python.runner in merged config chooses the DEFAULT backend; an explicit
environment argument still wins.run_tests handler for Python. Two execution environments:
- the DEFAULT is hermetic, stdlib-only GraalPy. It discovers `test_*.py` /
`*_test.py` under `{paths}` (default: the project's declared pytest
`testpaths`, else `tests/` if present, else the run's `cwd`) and runs
each in a TRUSTED GraalPy context via the built-in pytest shim.
`{paths}` entries may be FILES or dirs, resolve against `cwd`, must
exist, and discovering nothing is NOT a pass. It runs whole FILES and
has no test-name filter, so a `<path>::<test-name>` node id is REFUSED
here (pointing at `{environment "project"}`) rather than quietly
running every test in the file. The project's declared
import roots (a `src` layout) are on `sys.path`; installed third-party
deps are NOT visible. When that layout could not be READ, the result
carries a `warning` instead of quietly claiming the project has none.
- `{environment "project"}` shells the project interpreter's pytest
(the argv pinned as `python.interpreter`, else `uv`/`poetry`/`.venv`/
`python3` `-m pytest <paths>`) so installed test dependencies are
visible. Node ids go straight through as pytest's own
`file.py::test_name`, and a PATHLESS `::test_name` becomes `-k`.
BOTH backends name their faults: every failing/erroring test comes back in
ONE `failures` list as `{ns test type message file line}`, `type` telling a
thrown `"error"` from a false-assertion `"fail"` (the project backend
reads pytest's own `--junitxml` report), and `output` carries the transcript
capped in the middle behind a marker that says how much it dropped.
`python.runner` in merged config chooses the DEFAULT backend; an explicit
`environment` argument still wins.(register-repl-resource! session dir result & [id])Mirror a managed Python REPL into the session resource registry (ctx + footer
Mirror a managed Python REPL into the session resource registry (ctx + footer + stop by id; no restart — stop, then start). No-op without a session or a live pid.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |