6.7 Using the OS environment settings
There are several ways to look at inputs provided by the users of our software:
Interactive input: This is provided by the user as required by the application. See the Using input() and getpass() for user input recipe.
Command-line arguments: These are provided once, when the program is started. See the Using argparse to get command-line input and Using invoke to get command-line input recipes.
Environment variables: These are OS-level settings. There are several ways these can be set:
At the command line, when running the application.
Set in a configuration file for the user’s selected shell. For example, if using zsh, these files are the ~/.zshrc file and the ~/.profile file. There can also be system-wide files, like the /etc/zshrc file.
In Windows, there’s the Advanced Settings option for environment variables.
Configuration...