Closed jfmoulin closed 4 years ago
I guess when you exit the inner shell, it causes IPython to completely shut down. IPython unfortunately only ever has a single shell instance globally.
Probably the simplest way to fix it would be to temporarily override exit()
and Ctrl-D
in the inner shell to just exit the shell without shutting it down.
Maybe we can catch SystemExit. I don't know if the cleanup happens before or after it is raised.
When working under ipython (ver), if a script raises an error and I do a post mortem analysis it seems impossible to get back to my original ipython session. This is pretty annoying in case the script is debugged after a computing intensive preparation step in the interactive shell.
steps to reproduce:
It seems this happens only if I invoke an ipy shell from the pudb. If I simply inspect code and exit everything works fine and I get back to my original shell session.