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.3.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.3-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file traceprintplus-0.3.tar.gz.

File metadata

  • Download URL: traceprintplus-0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 054de796ff2ffa24e0b9819b7248678878f8c422ebf093a1380e5fec380c5a99
MD5 9a916005827325243c517e8c3c822eab
BLAKE2b-256 60f6717c681d5372917f30d70f0bd2ce7f61f68e370d77e73b6caa25f6ebb2e4

See more details on using hashes here.

File details

Details for the file traceprintplus-0.3-py3-none-any.whl.

File metadata

  • Download URL: traceprintplus-0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.6 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c358dd3aa5187ccb1efa32a202feaff4259b051783fa47a21ff756bce3d2d66d
MD5 29f750bb7b583114afe0c474bfdd90ab
BLAKE2b-256 98636adf6454b15db485bf1e3ca193980790636c4dbe750e55f5c4e76a8c90bd

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