cli
Internal CLI exposed to Python.
Index
Classes
External command context |
||
An external CLI command that may be invoked by the command line argument parser. |
||
Options for the |
Functions
- main(args: Sequence[str], interactive: Callable[[syside.cli.Interactive], int] | None = None, external: Sequence[syside.cli.ExternalCommand] = ()) int
Entry point to internal Syside CLI. Returns exit code on completion.
argsmust either be<syside> args...or<python> -m <syside> args..., i.e. they must be the same as called from the command line, e.g.sys.argv.The
interactiveargument is used to provide Python implementation for theinteractivecommand.Raises anything
interactiveorexternalmay raise if executed.The
servercommand will use underlying nativestdinandstdoutstreams directly, any modifications tosys.stdoutandsys.stdinwill not be propagated.Warning
Multiple threads running
servercommand simultaneously are not supported as it overrides global exit and error hooks. If multiple servers are needed, run them in separate processes.