Skip to main content

Tiny ANSI color print helpers for Python

Project description

printcolorpt

Tiny ANSI color print helpers for Python.

printR(*args, **kwargs) is equivalent to print(*args, **kwargs) except the color of text.

print((RED("hello") + YELLOW("world!")) is equivalent to print("hello" + "world!") except the color of text(s).

you can use the first 5 functions for entire colorization of the sentence: printR(red), printG(green), printY(yellow), printB(blue), and printD(dark gray - short for "Debug").

you can use the rest 5 functions for partial colorization of the sentence: RED(red), GREEN(green), YELLOW(yellow), BLUE(blue), and DEBUG(dark gray - short for "Debug").

usage

from pt import *


printR("this is red")
printG("this is green")
printY("this is yellow")
printB("this is blue")
printD("this is dark gray")

print(RED("this is red. ") + YELLOW("this is yellow."))

Install

pip install printcolorpt

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

printcolorpt-0.1.2.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

printcolorpt-0.1.2-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file printcolorpt-0.1.2.tar.gz.

File metadata

  • Download URL: printcolorpt-0.1.2.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for printcolorpt-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3be378144cadf2c765f44f5d2a08e6526eb44a1fdaf628834cba882e96cded9e
MD5 4024ff85bac670525f8c68fcd6308e19
BLAKE2b-256 2d570d6afd69226daf0038314a493ed36784bc2a1fdc7d4731e08ccec0c4a52c

See more details on using hashes here.

File details

Details for the file printcolorpt-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: printcolorpt-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for printcolorpt-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 59a88e7d3851e15a515239ee2d0769eba0a829d05e3cc20fda9c03c4f21b7edb
MD5 4eec5c3b4341b3b5f0cef55b327b1661
BLAKE2b-256 b181709267492551469febf0ac61ab3a3c0c1bfdd25675269652adc3faca5369

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