Use Python's stdlib `os` module to read and write environment variables, inspect the running OS, and build portable file paths ā then extend `deploy_check.py` to read DEPLOY_ENV, APP_VERSION, and a configurable base path from the environment so behaviour changes without touching argparse.
Create a dedicated directory, activate the virtual environment, and confirm the `os` module is available. `os` is part of the Python standard library ā no pip install needed.
mkdir -p ~/devops-python/lesson-202cd ~/devops-python/lesson-202source ~/devops-python/lesson-101/devops-env/bin/activatepython3 -c "import os; print('os module OK'); print('platform:', os.name)"The os module provides a portable interface to operating-system functionality: environment variables, process information, file-system path manipulation, and more. os.name returns 'posix' on Linux and macOS, 'nt' on Windows.
Because it is part of the standard library, import os is all you need ā no installation step.
Your terminal prompt shows (devops-env).
The one-liner prints os module OK followed by platform: posix (on Linux or macOS).