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.11.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ei-0.0.11.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

File hashes

Hashes for ei-0.0.11.tar.gz
Algorithm Hash digest
SHA256 52cf5ae2abf6cf5639af440beca57e9ebbed47e438850339533ba651a5e31c9d
MD5 952e17aafe250e98c55226bab8b67464
BLAKE2b-256 48741dae746fe8fc1d6d3c5d29268890a51f21fa2530dcf7707f0606cb805950

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ei-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

File hashes

Hashes for ei-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 0966f43f582ac301296a6c2ae3270ac0930773e976ecb597ec4e648b37a96227
MD5 91545ad65a6bd6eceaa67819cf43fc6d
BLAKE2b-256 16124de08eece2ef6352aa7eaf87db207440c99d830ae30870bbae25550f6c98

See more details on using hashes here.

Supported by

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