For some reason I have to write Python for Windows (extremely tedious), and can't find a way to append the script's current directory to the PATH environment variable.
I know about
import os
os.environ["PATH"] += os.pathsep + <current_directory>
but this doesn't do it for me since the change is not permanent.
All the answers point to changing the PATH by using the GUI (System > Advanced System Settings > Environment Variables). I want to automate my tool as much as possible so the user only has to run the config.py
file and start working, without worrying too much about path variables.
On Linux I just wrote to .bashrc and sourced the file. How can I do this in Windows?