Skip to main content

This module can colorize any text in your terminal

Project description

PaintPrint

This module can colorize any text in your terminal

Installing

pip install PaintPrint

Quick start

Hello world

This is a simple hello world:

from PaintPrint import *

bprint("Hello world!", 
       FORMATTING.BOLD, 
       FOREGROUND.RED, 
       BACKGROUND.GREEN)

In your console you can see something like this:

Unreadable symbols

If you see incomprehensible symbols instead of colors in the console, perform this function at the beginning of your code:

from PaintPrint import *
neutralizeColorProblem()

Templates

In this module you can use some templates for beautiful print on terminal:

from PaintPrint import *

bprint("TEMPLATES", 
       FORMATTING.BORDERED, 
       FORMATTING.BOLD, 
       FOREGROUND.MAGENTA, 
       BACKGROUND.WHITE)

print("Template for links: " + bformat("python.org", TEMPLATE.URL))
bprint("This is a `positive` template", TEMPLATE.POSITIVE)
bprint("\tAnd this is a `negative`", TEMPLATE.NEGATIVE)
print("You also can write " + bformat("yes", TEMPLATE.YES) + " and " + bformat("no", TEMPLATE.NO) + " like here")
print("If you like " + bformat("black and white", TEMPLATE.BLACKWHITE1) + " or " + bformat("white and black", TEMPLATE.BLACKWHITE2) + " you can using special templates!")

Result:

All functions

Open test file and perform in your PC. You will see something like this:

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

PaintPrint-1.0.4.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

PaintPrint-1.0.4-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file PaintPrint-1.0.4.tar.gz.

File metadata

  • Download URL: PaintPrint-1.0.4.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.9.5 Windows/10

File hashes

Hashes for PaintPrint-1.0.4.tar.gz
Algorithm Hash digest
SHA256 8f5b5daa5a60b5b394d8da4e59717e4534bdd5c331a3396c8d6df6f8b5431ba2
MD5 4344dcdc14aed53f2543c7e5faa5f3ce
BLAKE2b-256 a7ea5f79b2684a8215bb16bcc63f2763873387e3c6e22c0eafdbb80d8862443b

See more details on using hashes here.

File details

Details for the file PaintPrint-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: PaintPrint-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.9.5 Windows/10

File hashes

Hashes for PaintPrint-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f3c36d567cc118a7521115a64d4d80a232c970d050ba0784f59baea2645196a7
MD5 52d47109f2953738b2441eb5134e49ba
BLAKE2b-256 81fa9493aebfe0424b68266e76ebd88fda6247fff04a309ac642fff236364528

See more details on using hashes here.

Supported by

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