[IPython-dev] parameter sys_exit=1 in IPShellQt

Hans Meine hans_meine at gmx.net
Mon Sep 10 01:55:43 EDT 2007


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
>   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:

> 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: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20070910/c09d27e0/attachment.sig>

More information about the IPython-dev mailing list