Expand description
A Python module mounted as an environment (spec: Environment
Mounts, py=python:./helpers.py; Environment Commands): the
module’s functions as commands under the mount’s alias, with the
native framing. The input is the first positional parameter
unless $_ places it among the operands or in an option’s value
(py:round(2) is round(x, 2), py:sub("^get_"; ""; $_) is
sub("^get_", "", x), py:f(--data=$_) is f(data=x)); the
operands are the positional arguments in order, the options the
keyword arguments; a raised exception is a failed call, null
after | and a refusal after @|, where the one call over the
stream answers one thread per returned value. The module is
imported once at mount time, from a file or by its import path,
and its synopses are read from the functions’ signatures as a
reflected library’s are. An environment reaches outside the
query by definition, so nothing in the module is withheld for
reading a file.
Structs§
- Module
Environment - One mounted module: a command library under the mount’s alias.