Skip to main content

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 black
red red
green green
yellow yellow
blue blue
magenta magenta
cyan cyan
white white
Bright Colors Sample Text
bright_black bright_black
bright_red bright_red
bright_green bright_green
bright_yellow bright_yellow
bright_blue bright_blue
bright_magenta bright_magenta
bright_cyan bright_cyan
bright_white bright_white
Accent Colors Sample Text
orange orange
pink pink
purple purple
light_blue light_blue
teal teal
lime lime
light_gray light_gray
dark_gray dark_gray
Reset Sample Text
reset 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

traceprintplus-0.4.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

traceprintplus-0.4-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

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

Hashes for traceprintplus-0.4.tar.gz
Algorithm Hash digest
SHA256 c15f8cd738a39820c0c0433345541989807278357dcb9e5ce8c52a292af69710
MD5 d384d7d89efaa9ee5274a98d648a7e86
BLAKE2b-256 d1b06c6133ce656216b5d255aed2a9116fa5945f001a74a58b0695f4155380af

See more details on using hashes here.

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

Hashes for traceprintplus-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 111f8b465f0cf2839983bcc1612ec0f4f0ed810b1d579d379df16f8f3f79a213
MD5 aea9cbae4d5c1268c7e2173a67f6b265
BLAKE2b-256 4a648959b0941ec8de39ae458f3408818787bcc8b764e0e450d1b3bb0de10093

See more details on using hashes here.

Supported by

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