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

Uploaded Python 3

File details

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

File metadata

  • Download URL: printcolorpt-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 246aa08558a3c6e2aeb5e82fab7b592fd03141298ae19f06b8a814b4624c03bc
MD5 6509a4424a24e8ef3f71cbf9c257a643
BLAKE2b-256 0abb56a5e9a909d492c5c36fc6e5c8cfe2c61b3003de8d156349a3cb0746d281

See more details on using hashes here.

File details

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

File metadata

  • Download URL: printcolorpt-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 26276f599918484476747d3b626067512ba8b03551ce302574b0169d1115a83f
MD5 7f49bff7310f9d38c28e6539132ac1ec
BLAKE2b-256 3b38e3936f08b0b59cc4eff737733af441b25895098f3a18a51ef1374cde1c80

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