title: How can I have a python script safely exit itself?
body: <p>Heres the scenario I have a password that must be entered if entered wrong the script will not proceed and just exit itself? But how can I tell the script to safely exit itself?</p>
  
  <p>I tried <code>sys.exit()</code> but that gives a traceback error and doesn't seem like a very clean exit method.</p>