Skip to main content

Automatically embed IPython into arbitrary stack frames in traceback.

Project description

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:

def main():
    a = 123
    b = 0
    return a / b

if __name__ == '__main__':
    import ei
    ei.patch() # overwrites sys.excepthook

    main()

Unpatch to recover sys.excepthook:

ei.unpatch()

Context manager:

with ei.capture():
    main()

# The exception hook is recovered here

Lazy patch:

import ei.patched

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ei-0.0.12.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ei-0.0.12-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file ei-0.0.12.tar.gz.

File metadata

  • Download URL: ei-0.0.12.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.6

File hashes

Hashes for ei-0.0.12.tar.gz
Algorithm Hash digest
SHA256 cab0a085f2fc6c44d9ca7c3e33a48e1db903cffd01175a18abe6096ec1dba7ac
MD5 e0dc861061ded0c9953805c5c0eb33b0
BLAKE2b-256 d6168f119aa17a7433ac3f24b7e37c68d9c84db010a2202da09896d9c0fc6f55

See more details on using hashes here.

File details

Details for the file ei-0.0.12-py3-none-any.whl.

File metadata

  • Download URL: ei-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.6

File hashes

Hashes for ei-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 8a0714aa838d81a5322360fbd244687294c584e97fb3325e62bf6cd393655f55
MD5 424309f2d132c95e2cc1f2df21584458
BLAKE2b-256 764c0c71a2f3d187dedf70d772a76c18b50bb8bbb81ec3e258a42cec92650794

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page