Module zut.context
Information about the execution context: script path and name, user scopes, SID, etc.
Functions
|
Raise an exception if the current user is not root (Linux/macOS) or does not have admin privileges (Windows). |
Return the path to the Python file that was originally executed (e.g. my_module/__main__.py or .venv/bin/my-module). |
|
|
Retrieve the current user's global SID (Security Identifier) on Windows, on on Linux if the host is part of an Active Directory domain. |
Indicate whether the application is running in a Docker container. |
|
|
Indicate whether the application is running as root (Linux/macOS) or with admin privileges (Windows). |
Indicate whether the application is running in user-scoped context (typically: interactive, human user) or in system-scoped context (typically: daemon, service, non-interactive): - When in user-scoped context, the application should read and store data in user directories by default (XDG/APPDATA/home-based defaults). |