Set Environment Variable using Python

os.environ object

import os

envVar = 'root'
os.environ['USER'] = envVar

Leave a Comment

Cancel reply

Your email address will not be published.