Environment Variables¶
Detecting the System Environment¶
The module userenv sets an environment variable ISAMBARD_HOST by default.
This allows users to programmatically detect which system their code is running on, such as:
Isambard 3Isambard 3 MACSIsambard AI P1/P2
Example Usage¶
(base) pmatuure.brics@login40:~> python3
Python 3.12.12 | packaged by conda-forge | (main, Oct 22 2025, 23:16:53) [GCC 14.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> host = os.getenv("ISAMBARD_HOST", "Unknown System")
>>> print(f"Running on: {host}")
Running on: I-AI_P2
>>>