sas package

Subpackages

Submodules

sas.cli module

SasView command line interface

This functionality is under development. Interactive sessions do not yet work in the Windows console.

Usage:

sasview [flags] [file1 file2 …]

Run SasView. If no flags, a list of loadable files, or -q is given, this will start the GUI. The list of files can include individual data files, data directories, analysis files, and project files. Any number of files may be listed and an attempt will be made to load them all, but please note that loading multiple projects may create load conflicts.

sasview [flags] script [args…]

Run a python script (with the extension .py or .py.txt) using the installed SasView libraries [passing optional arguments]. Please note, this is the same API as launching the GUI with data files. Whether a script is run or the GUI is launched, is determined by the first non-flag argument.

sasview [flags] -m module [args…]

Run a SasView/Sasmodels/Bumps module as main [passing optional arguments]

sasview [flags] -c “python statements” [args…]

Execute python statements using the installed SasView libraries

sasview -V

Print sasview version and exit.

Flags:

-i, –interactive. Enter an interactive session after command/module/script.

-o, –console. Open a console to show command output. (Windows only)

-q, –quiet. Suppress startup messages on interactive console.

Note: On Windows any console output is ignored by default. You can either open a console to show the output with the -o flag or redirect output to a file using something like sasview … > output.txt.

sas.cli.is_script(filename: str | Path) bool
sas.cli.main(dev_mode: bool | None = None) int

Run the main program.

If dev_mode is True then rebuild the UI before running. If dev_mode is not provided, then look into the filesystem to guess whether we are running from the source tree or from an installed version.

sas.cli.parse_cli(argv: list[str]) Namespace

Parse the argv arguments from the command line.

  • version: bool - print version

  • command: str - string to exec

  • module: str - module to run as main

  • interactive: bool - run interactive

  • args: list[str] - additional arguments, or script + args

Module contents