##// END OF EJS Templates
Minor fixes in genutils, and a BIG fix for threading. I _think_ I got...
Minor fixes in genutils, and a BIG fix for threading. I _think_ I got Ctrl-C to work in the threaded shells, and the solution is in fact absolutely trivial. The new code is _much_ simpler than what we had! This needs testing, because I find it almost hard to believe that we hadn't tried this before. But if it works, great! The only limitation is that in threaded mode, the traceback shows the internal sigint handler frame. Big deal, it's just cosmetic.

File last commit:

r0:6f629fcc
r20:fb5e5b43
Show More
ipython
28 lines | 981 B | text/plain | TextLexer
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""IPython -- An enhanced Interactive Python
This is just the startup wrapper script, kept deliberately to a minimum.
The shell's mainloop() takes an optional argument, sys_exit (default=0). If
set to 1, it calls sys.exit() at exit time. You can use the following code in
your PYTHONSTARTUP file:
import IPython
IPython.Shell.IPShell().mainloop(sys_exit=1)
[or simply IPython.Shell.IPShell().mainloop(1) ]
and IPython will be your working environment when you start python. The final
sys.exit() call will make python exit transparently when IPython finishes, so
you don't have an extra prompt to get out of.
This is probably useful to developers who manage multiple Python versions and
don't want to have correspondingly multiple IPython versions. Note that in
this mode, there is no way to pass IPython any command-line options, as those
are trapped first by Python itself.
"""
import IPython
IPython.Shell.start().mainloop()