-
Notifications
You must be signed in to change notification settings - Fork 2
execution
In the configuration there is an exec/autoexec attribute. This should be a symbol name or list of symbol names to run as the default process. This is the process that will run when running in interactive loop mode, or when run once.
If symbols are given on the cli after the option then that list takes the place of the autoexec for that execution.
- Run Autoexec once
- Run the Autoexec in an intractive loop
- Run a repl
- Run command line args once
- Run command line args in an intractive loop
- Run command line args once and start the repl
-
SPR -iRun in a loop doing a process over and over -
SPRRun a process once -
SPR cmd1 cmd2Run a list of command/symbols from the command line -
SPR -f foo.sprRun an SPR file. -
SPR -rRun as an interactive REPL -
SPR -r cmdsRun as an interactive REPL, executing cmds on startup. -
SPR -rf foo.spr cmdsRun as an interactive REPL, loading a file and executing cmds on startup.
When run with no Arguments, SPR will try to do whatever is set as the autoexec in the configuration file. This setting should be a list of words understood by the interpreter.
With -f a file can be given for SPR to run on startup before the
autoexec or repl is started.
The configuration file can also hold SPR code in the functions: section.
Additionally there are hooks which can be defined in the configuration to do what you like, at particular steps of the process.
-
Load module config - SPR-Defaults, SPRconfig.yaml
-
core.py
-
The autoload defined will first be loaded.
-
The Startup Hooks defined in the configuration will run.
-
The file given with -f will run next.
-
Run with a REPL,
- Commands on the command line will execute on startup.
-
Run the Automatic Exec once or in a loop.
- Commands given on the command line will replace the autoexec defined in the configuration file.
-
The Shutdown Hook defined in the configuration will run last
In any case, if any step fails, the process will fail. if in interactive loop mode, -i, The failure and continue dialogs will catch the fail for the next loop.