System Menu > Advanced System Settings
> Environment Variables...
> in User Variables click New...
> insert variable name (VAR_NAME) and value (VAR_VALUE)
When coding it may be necessary to restart your IDE or text editor.
Open the terminal:
$ cd
$ nano .bash_profile
To the file add the line and save:
export VAR_NAME="VAR_VALUE"
When coding it may be necessary to restart your IDE or text editor.
import os
var1 = os.environ.get('VAR_NAME')