debugtools — Easily print useful debugging information
This package provides a handful of functions you can use to print debugging information. There are basically two things that are useful about these functions. First, they’re only one or two letters each, so you can type them really quickly while debugging. Second, they append the name of the calling function to whatever you’re printing, so you can easily see where each message came from (and you don’t have to hunt down print statements once you finish debugging).
Installation
You can install debugtools using pip:
$ pip install debugtools
Usage
I typically the following import at the beginning of any file that I’m likely to debug:
from debugtools import p, pp, pv
The p() function behaves just like print(), except it appends the name of the calling function to whatever you’re printing. I often use it with no arguments, just to see if a function is being called or not.
The pp() function is to pprint.pprint() as p() is to print(). The pv() function calls pp() with the dictionary of variables in the calling scope, so it’s a good way to see what variables are defined in the function you’re debugging.
Metadata
Release files for debugtools 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| debugtools-0.2.0.tar.gz | 8.5 kB | Without provenance | Details for debugtools-0.2.0.tar.gz |
Release files / debugtools-0.2.0.tar.gz
| Download URL | debugtools-0.2.0.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8bed30c8e80d0d0da5af8745da07502692c36604e039ba93b25f560eb7cf5d9
|
|
BLAKE2b-256 checksum How to use checksums |
ee0c0eb19bc45247f9a9ea09f47a8741ef9af67890090f6a13051d161caeef1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for debugtools 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.