python how to add environment variables code example
Example 1: python create environment variable
import os
os.environ['variable_name'] = 'variable_value'
Example 2: edit path variable using python
app_path = os.path.join(root_path, 'other', 'dir', 'to', 'app')
os.environ["PATH"] += os.pathsep + app_path