title: Change %PATH% from Python Script (Windows)
body: <p>As part of a project, I need to ensure that a few paths are included in the user's %PATH% variable, which I am going to do at the beginning of the script. What's the best way to do this from a python script? </p>
  
  <p>My first thought was to just use something like the following:</p>
  
  <pre><code>subprocess.call('path = %PATH%;c:\path1;c:\path2;c:\path3')
  </code></pre>
  
  <p>To add each of the paths, as this is how you would do it from the Windows command line, though my fear is that after a reboot these settings would not carry over (this is what seems to happen when I run it from the command line regularly - in order for it to stick, I actually have to go in through the GUI and change it).</p>
  
  <p>Anyone have a better idea, or will this work as I'd like it to? (Ideally, the user will only have to execute this portion of the script once, at which point the 'setup' will be complete and not need to be run again)</p>
  
  <p>Thanks!</p>