Created
December 16, 2019 14:39
-
-
Save knu2xs/8b18f5cfb691eaccae4ad83d99d76f28 to your computer and use it in GitHub Desktop.
Python Set User Environment Variable in Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
key = 'SOME_KEY' | |
val = 'someValue' | |
os.system(f'setx {key} {val}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment