change path os python code example
Example 1: how to change os path in python
os.chdir(path)
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
os.chdir(path)
app_path = os.path.join(root_path, 'other', 'dir', 'to', 'app')
os.environ["PATH"] += os.pathsep + app_path