[IPython-dev] parameter sys_exit=1 in IPShellQt

Hans Meine hans_meine@gmx....
Mon Sep 10 00:55:43 CDT 2007


Hi!

On Montag 10 September 2007, killian koepsell wrote:
> i just discovered the nice hint in the ipython script to put the
> following two i lines into the
> PYTHONSTARTUP file:
>   import IPython
>   IPython.Shell.IPShell().mainloop(sys_exit=1)

Hehe, nice hack!
But why would you do this?  If you want ipython, just start ipython, not 
python.. I occasionally like to be able to start python without bells and 
whistles, e.g. as a simple calculator.

BTW: You can also have completion w/o ipython:
http://kogs-www.informatik.uni-hamburg.de/~meine/python_tricks#completion-in-the-python-console

> it works great! however, i noticed that if i use IPShellQt instead,
> the ipython shell does not exit the python shell.

I think you would need to call qt.qApp.quit() instead of sys.exit here.

-- 
Ciao, /  /                                                    .o.
     /--/                                                     ..o
    /  / ANS                                                  ooo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.ipython.scipy.org/pipermail/ipython-dev/attachments/20070910/c09d27e0/attachment.bin 


More information about the IPython-dev mailing list