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

Uploaded Python 3

File details

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

File metadata

  • Download URL: traceprintplus-0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 5e12b19da064e4affdfc19bc6e634c9b5063209bbb2f9f19efbbbdd25cd62b69
MD5 ed7ddc10c9b59070ed957e2e465d0db0
BLAKE2b-256 8bb0dd5fb397e0ac0de1df502b9f1205af29c96323496076f54c2eba160d7a5e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: traceprintplus-0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aad8bc2a9131a5138863e106422e725bda55b93eb7653c5717b46006c0650f60
MD5 22925f0c7b0350c0d0dbdb4a6fcf27c8
BLAKE2b-256 dbff8036d73702510531f88371227a5da1b755a9d8ad05838fbc10e83e8cce9e

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