Skip to main content

A fast way to print in color.

Project description

gprint

PyPI - License Mantainer Maintenance PyPI - Python Version PyPI

gprint is a Python module that allows to print color on almost any terminal.

How to import

from gprint import *

Usage

gprint(message, rgb, new_line, rainbow_mode, return_me)

message = String with the text to be printed.

rgb = A list of 3 Integers from 0 to 255 that represents every color on rgb scale, a color code (RED, BLUE....) can be used too. Defaults to "default" (white text).

new_line = A boolean that represents if you want a new line after the printed text or not. Defaults to True.

rainbow_mode = A boolean that allows the command to print every character from a pseudo-randomized color. Defaults to False.

return_me = A boolean that allows to return of the colorized text instead of printing it directly (useful for other commands like input() ). Defaults to False.

Errors and contact

guillermo@guillerpsanchez.dev

Feel free to contact me at any time.

Changelog

0.0.1 - Initial release.

0.0.2 - Added rainbow_mode. - Added new_line.

0.0.3 - Fixed problem with randomized colors. - Added return_me.

0.0.4 - Fixed problem with rainbow_mode, now it should work with new_line. - Fixed problem with "RANDOM" string as color, nowit should work faster and with other flags. - Added new function to get random color, the program now should work faster.

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

gprint-0.0.4.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

gprint-0.0.4-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file gprint-0.0.4.tar.gz.

File metadata

  • Download URL: gprint-0.0.4.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for gprint-0.0.4.tar.gz
Algorithm Hash digest
SHA256 1aa721b9a4dab8e03e90d638d392d16704d78026ab79072434ea707a81bf913d
MD5 01e4b4d86c6537273f7e3eb57c603cee
BLAKE2b-256 df61a0c4a2c59b8a781496dc44fddd0d145b2b3a66e9ff5b3c10f172a19349c4

See more details on using hashes here.

File details

Details for the file gprint-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: gprint-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for gprint-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 55e0dbe015ef42ecf9654020582967f0a20b31577506d865faa77b27a699fb89
MD5 2c5d2d99bc3286f7300fba33827f9d56
BLAKE2b-256 51321ca1c97e8a6d2167ff32b5bed06936b5f73ff8c44af8551f258b76b6f2af

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