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.

0.0.5
- Updated code with better syntax.
- Now runs faster than ever.

0.0.6
- Fixed bug with new line on rainbow mode.

0.0.7
- Fixed error if a string is provided in rgb.
- Added error handling.

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.7.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

gprint-0.0.7-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gprint-0.0.7.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for gprint-0.0.7.tar.gz
Algorithm Hash digest
SHA256 0ea05851cd62f57ea8878410b7ff8d1ff7beff985354b4b5e10baace87716b9e
MD5 b76fce7535859ea8b7513ef982efa770
BLAKE2b-256 cb81ff9b4e01ecee829f74e84311a594d7d0f84b4e18600705f353543be0559a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gprint-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for gprint-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 022a0bc1289a595d40161cf5e17040f5fe0725156965042dd798ea251fe0c64f
MD5 a6f76bc57969930bd07e72e4f9f2cde9
BLAKE2b-256 2af98b83eb93e31bdf818b28b33bec28c359fa36388b7ef5a8b2d3f024067200

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