SLiCAPconfigure.py

SLiCAP scripts for configuration management.

  1. Main configuration is stored in ~/SLiCAP/SLiCAP.ini

  2. Project configuration is stored in <project folder>/SLiCAP.ini

Configuration settings are imported as global (ini.<setting>)

check_for_updates(timeout=3)

Contacts GitHub for the latest SLiCAP release, stores the result in the main configuration file (~/SLiCAP/SLiCAP.ini), and returns it.

Runs on demand only (GUI: Help > Check for updates); deliberately never on import, so importing SLiCAP is fast and works offline.

Parameters:

timeout (int, float) – Network timeout in seconds, defaults to 3.

Returns:

Latest release version, or ‘Unknown’ when GitHub could not be reached. Compare with ini.install_version.

Return type:

str

dump(section='all')

Prints the global SLiCAP settings.

Parameters:

sections – “all”, or name of section to be printed: - VERSION - INSTALL - COMMANDS - PROJECT - PATHS - HTML - DSIPLAY - MATH - PLOT - BALANCING

Return None:

Rtype NoneType:

Example:

>>> import SLiCAP as sl
>>> sl.ini.dump()
main_config_path()

Location of the MAIN configuration file: ~/SLiCAP/SLiCAP.ini.

The main configuration lives in its own folder so it can never collide with a project’s SLiCAP.ini (decided 2026-07-15: with the old location ~/SLiCAP.ini, a project in the home directory silently destroyed the main configuration). A visible folder — not a hidden dot-folder — for Windows friendliness. A pre-existing main configuration at the legacy location is migrated automatically by _read_main_config().