Hack Forums
[Python] Can I add working directory to path with a python code? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] Can I add working directory to path with a python code? (/showthread.php?tid=5998158)



Can I add working directory to path with a python code? - george12324 - Aug 11, 2019

Need a code to add a working directory to system path for a GUI am working on


RE: Can I add working directory to path with a python code? - Wiked™ - Aug 14, 2019

I'm not sure if python actually provides any permanent solution. However you are able to set Path Variables with CMD, and PowerShell.

EX

[b]Add directory to system path environment variable:
Open administrator command prompt
Run  the below command[/b]

Code
pathman /as directoryPath
Remove path from system path environment variable:
Run the below command from elevated command prompt


Code
pathman /rs directoryPath