seems a hard way to go to not write unit tests. FWIW, I use the shell too for exploratory coding but the moment that I find myself making changes and restarting the shell, chances are it's time to write it in a unit test.
"ipdb exports functions to access the IPython debugger, which features tab completion, syntax highlighting, better tracebacks, better introspection with the same interface as the pdb module."