Context
We'd like sandboxed code to be able to import from .py files in Monty's filesystem — pull functions/helpers out of a module placed there — so code can be shared and reused across executions instead of copy-pasted into every snippet.
This isn't third-party/package import (a known non-goal); it's loading code that already lives in Monty's filesystem.
(Today from lib import helper raisesModuleNotFoundError — import resolves only the built-in stdlib. )
Request
Let import (or a dedicated load call) resolve modules from files in Monty's filesystem. The loaded source runs in the same sandbox, so it grants no capability beyond "run more sandboxed Python."
Prior art
Starlark offers similar behavior via its native load("lib.star", "helper").
Context
We'd like sandboxed code to be able to import from
.pyfiles in Monty's filesystem — pull functions/helpers out of a module placed there — so code can be shared and reused across executions instead of copy-pasted into every snippet.This isn't third-party/package import (a known non-goal); it's loading code that already lives in Monty's filesystem.
(Today
from lib import helperraisesModuleNotFoundError—importresolves only the built-in stdlib. )Request
Let
import(or a dedicated load call) resolve modules from files in Monty's filesystem. The loaded source runs in the same sandbox, so it grants no capability beyond "run more sandboxed Python."Prior art
Starlark offers similar behavior via its native
load("lib.star", "helper").