title: exit from ipython
body: <p>I like IPython a lot for working with the python interpreter. However, I continually find myself typing <code>exit</code> to exit, and get prompted "Type exit() to exit." </p>
  
  <p>I know I can type Ctrl-D to exit, but is there a way I can type <code>exit</code> without parentheses and get IPython to exit? </p>
  
  <p><strong>Update</strong>: Thanks to <a href="https://stackoverflow.com/users/17160/nosklo">nosklo</a>, this can be easily done by adding the following line to the main() function in your <code>ipy_user_conf.py</code>:</p>
  
  <pre><code># type exit to exit
  ip.ex("type(exit).__repr__ = lambda s: setattr(s.shell, 'exit_now', True) or ''") 
  </code></pre>