title: Restart a Python Program
body: <p>I'm writing a Python program that, if the user changes settings while running it, needs to be restarted to apply the changed settings. Is there a way of doing this? I'm thinking something along the lines of:</p>
  
  <pre><code>import sys
  command_line = ' '.join(sys.argv)
  # Now do something with command_line
  # Now call my custom exit procedure
  </code></pre>
  
  <p>Note: I'm on Windows, if that makes a difference</p>