Skip to content

Latest commit

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ei

Automatically embed IPython into arbitrary stack frames in traceback.

asciicast

Install

# PyPI
pip3 install ei
# GitHub
pip3 install git+https://github.com.djosix/ei.git

Usage

Basic 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 here

Lazy patch:

importei.patched

About

Embed IPython to rescue your code.

Resources

Stars

10 stars

Watchers

1 watching

Forks

Contributors

Languages