Skip to main content

Allow import of pdb in restricted code.

Project description

Introduction

To make a long story short: sometimes you need to break into the debugger in the middle of a Script (Python). To prevent the frustrating Unauthorized: import of 'pdb' is unauthorized message, use this enablesettrace package.

This package supports importing the pdb module. It is a fork of the original Products.enablesettrace package which still resides in the Zope Subversion Repository. The only change made was turning the package into an egg.

It also incorporates the monkeypatch from the zdb product from Chris Withers.

Installation

The installation is as simple as making sure the package is located on the Python path. For example when you are using zc.buildout list Products.enablesettrace in the eggs section:

[buildout]
...
eggs =
    ...
    Products.enablesettrace

Credits

This code was originally contributed by Zach Bir and committed by Jim Fulton. Mark van Lent eggified the product.

Jean Jordaan snarfed Chris’s code from https://github.com/Simplistix/zdb There is more in zdb that may be worth porting.

Changelog

1.2.0 (2021-01-20)

1.1 (2013-11-25)

  • Incorporate zdb monkeypatch to load the line cache

1.0 (2010-05-30)

  • Revert changes made in version 0.2 so the egg contains the same code as the original in the Zope Subversion Repository. Moved the ‘enhanced’ code to Products.Ienablesettrace. [markvl]

0.2 (2010-04-02)

  • Also allow import of ipdb. [markvl]

0.1 (2010-04-02)

  • Initial release: eggified version of Products.enablesettrace as stored in the Zope Subversion Repository.

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

Products.enablesettrace-1.2.0.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file Products.enablesettrace-1.2.0.tar.gz.

File metadata

  • Download URL: Products.enablesettrace-1.2.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/42.0.2 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/2.7.17

File hashes

Hashes for Products.enablesettrace-1.2.0.tar.gz
Algorithm Hash digest
SHA256 bd300a505191d1d4325866bc4eee3664c70e684d43c1cb51aed9c3305d78e8b7
MD5 8f88840c974d17ca904266c79a0fb4d5
BLAKE2b-256 11111ed6481193413ecbdfa9a4ca6d74aeb25e89c83e11139f5af8a918a9a2d1

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