title: sys.exit in python console
body: <p>Hi I have troubles using sys.exit in a python console. It works really nice with ipython. My code looks roughly like this:</p>
  
  <pre><code>if name == "lin":
      do stuff
  elif name == "static":
      do other stuff
  else:
      sys.exit("error in input argument name, Unknown name")
  </code></pre>
  
  <p>If know the program know jumps in the else loop it breaks down and gives me the error message. If I use IPython everything is nice but if I use a Python console the console freezes and I have to restart it which is kind of inconvenient.</p>
  
  <p>I use Python 2.7 with Spyder on MAC. </p>
  
  <p>Is there a workaround such that I the code works in Python and IPython in the same way? Is this a spyder problem?</p>
  
  <p>Thanks for help</p>