Simon Forman <sajmikins at gmail.com> writes: > This is not exactly an answer to your proposal, I know, but FWIW > Ipython has exactly this capability. Yes. When you %run a scripts and get exception, you can launch post-mortem pdb on it by typing %debug.