Automatically embed IPython into arbitrary stack frames in traceback.
# PyPI
pip3 install ei
# GitHub
pip3 install git+https://github.com.djosix/ei.gitBasic usage:
defmain():
a=123b=0returna/bif__name__=='__main__':
importeiei.patch() # overwrites sys.excepthookmain()Unpatch to recover sys.excepthook:
ei.unpatch()Context manager:
withei.capture():
main()
# The exception hook is recovered hereLazy patch:
importei.patched