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.13.tar.gz (4.2 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.13-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ei-0.0.13.tar.gz
Algorithm Hash digest
SHA256 aa97005aa463f8ef353545b235f931709ff87eb617ddb260831323aea6d99088
MD5 b5825215717c1287d29ade8cc8213cc6
BLAKE2b-256 a5c1683acd2b021888c1ac7ba3861bf61efcd36e8a7fa9c33c9ca0c9aafd4965

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for ei-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 55e0e3ad40a6937b2231405d5704727af44a98c6bc628df7b645508e8c259ac2
MD5 4037a04ccb7abb35e0611797370b79b2
BLAKE2b-256 1193651af3c00ef49e88cea38f5e0a0e029d1acc95fe7732d30c246b3c1daef8

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