No project description provided
Project description
TracePrint-plus - Advanced Python Debugging & Logging Utility
TracePrint-plus is a flexible, developer-friendly Python utility that makes debugging and logging smarter. It automatically prints variable names alongside their values, supports custom messages, optional timestamps, and file/line tracking. With configurable color output, separators, and debug toggles, it transforms ordinary print statements into informative, visually distinct logs—perfect for tracing code execution efficiently.
Authors
Features
-
Automatic Variable Display - Prints variable names with their current values for easier debugging.
-
Custom Messages - Add optional debug messages or prefixes to your logs.
-
Timestamps - Optionally show the current time for each print statement.
-
File & Line Tracking - Display the source file and line number where the print occurred.
-
ANSI Color Support - Highlight debug output with standard, bright, or custom colors.
-
Global and Per-Print Coloring - Apply colors globally or override per statement.
-
Configurable Separators - Customize how multiple variables are joined in output.
-
Debug Toggle - Enable or disable debug printing via a single configuration option.
-
Smart Start Message - Optionally prepend a message at the first log for clarity.
-
Minimal Setup - No complex logging setup just import and use.
Installation
Install traceprint-plus with npm
npm install traceprintplus
cd traceprintplus
Install traceprint-plus with pip
pip install traceprintplus
Usage/Examples
import traceprintplus as tp
# Settings that traceprintplus-plus (tp) will follow
tp.config.update({
"DEBUG": True,
"COLORSFORDEBUG": True,
"SEP": True,
"SEPSTYLE": " | ",
"MESSAGE": "TRACEPRINT:",
"COLOR": "cyan",
"TIMESTAMP": True,
"FILELINE": True,
"FILELINEARGS": (2, 7)
})
# Demo variables
x, y, z = 10, 20, 30
my_list = [1, 2, 3]
# Demo prints
tp.tprint(x, y, z)
tp.tprint(my_list, x + y, message="Mixed Demo:")
tp.config["DEBUG"] = False
tp.tprint("Debug off → only values")
Expected terminal output
[test.py:21] [12:13:47] TRACEPRINT: x = 10 | y = 20 | z = 30
[test.py:22] [12:13:47] Mixed Demo: my_list = [1, 2, 3] | x + y = 30
[test.py:24] [12:13:47] Debug off → only values
| Color Name | Sample Text |
|---|---|
| black | |
| red | |
| green | |
| yellow | |
| blue | |
| magenta | |
| cyan | |
| white |
| Bright Colors | Sample Text |
|---|---|
| bright_black | |
| bright_red | |
| bright_green | |
| bright_yellow | |
| bright_blue | |
| bright_magenta | |
| bright_cyan | |
| bright_white |
| Accent Colors | Sample Text |
|---|---|
| orange | |
| pink | |
| purple | |
| light_blue | |
| teal | |
| lime | |
| light_gray | |
| dark_gray |
| Reset | Sample Text |
|---|---|
| reset |
About Me
I'm a Developer who likes making Games in Unity and Programming in Python / C++
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
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 traceprintplus-0.4.tar.gz.
File metadata
- Download URL: traceprintplus-0.4.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c15f8cd738a39820c0c0433345541989807278357dcb9e5ce8c52a292af69710
|
|
| MD5 |
d384d7d89efaa9ee5274a98d648a7e86
|
|
| BLAKE2b-256 |
d1b06c6133ce656216b5d255aed2a9116fa5945f001a74a58b0695f4155380af
|
File details
Details for the file traceprintplus-0.4-py3-none-any.whl.
File metadata
- Download URL: traceprintplus-0.4-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
111f8b465f0cf2839983bcc1612ec0f4f0ed810b1d579d379df16f8f3f79a213
|
|
| MD5 |
aea9cbae4d5c1268c7e2173a67f6b265
|
|
| BLAKE2b-256 |
4a648959b0941ec8de39ae458f3408818787bcc8b764e0e450d1b3bb0de10093
|