Debug printing made easy.
Project description
Bugprint Package
You may call bp_setup(verbose=True) to buffer the printed message with dashes (-) to 80 characters.
Example Usage
from bugprint import bp
def add(x, y):
print(f"Adding {x} + {y} = {x + y}")
bp()
def subtract(x, y):
print(f"Subtracting {x} - {y} = {x - y}")
bp()
# Call bp() at specific lines in your code
bp()
add(1, 2)
bp("Addition Complete")
subtract(5, 4)
bp()
Output
DEBUG: tests.py:14
Adding 1 + 2 = 3
DEBUG: tests.py:7
DEBUG: tests.py:16 Addition Complete
Subtracting 5 - 4 = 1
DEBUG: tests.py:11
DEBUG: tests.py:18
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
bugprint-0.3.3.tar.gz
(2.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bugprint-0.3.3.tar.gz.
File metadata
- Download URL: bugprint-0.3.3.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
179718f6c39b568b58e016c1020dae8d9ef7e9dcc670fe8714576c6d205b6251
|
|
| MD5 |
7440efb1a722337998cf33401ff714d9
|
|
| BLAKE2b-256 |
97b918ae00aa41ab397c1a7220d07f8cba86b927c492be03d9482459b48c4b46
|
File details
Details for the file bugprint-0.3.3-py3-none-any.whl.
File metadata
- Download URL: bugprint-0.3.3-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a296358de03a04aa766b8dd884e9065f8bb29400e07b9472d93fef70b5d20657
|
|
| MD5 |
ab1df303a3e3880076929612d691a380
|
|
| BLAKE2b-256 |
3d410e714b402ad23393d08b4c4bbb42939fbf5304e2eed7621d745b3e3840e9
|