spinfirecontext.py — Context Module

Holds the script execution context. Every other spinfireapi module calls import spinfirecontext and reads spinfirecontext.ScriptManager to reach the active SpinFire session (except OpenFile and OpenFiles, which use only DefaultScriptManager) — this module has no functions of its own, just two module-level variables.

Variables

Variable

Description

ScriptManager

The active ScriptManager for the running script. Set by SpinFire before every script execution. Passed as the first argument to nearly every underlying Utilities call across the package.

DefaultScriptManager

The default ScriptManager, used specifically for file-opening operations (see application.py — Application Module’s OpenFile / OpenFiles / CloseFile). Also set by SpinFire before execution.

Both variables start as None in the source and are populated by the SpinFire host at runtime — they are not meant to be set by script authors.