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.

0.0.8
- Updated and checked compatibility with python 3.10

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

Uploaded Source

Built Distribution

gprint-0.0.8-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gprint-0.0.8.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for gprint-0.0.8.tar.gz
Algorithm Hash digest
SHA256 6dd1b09f3419647950b6e5995895f3c95b005a5c6ed5f3f5a4fe76f26af7dbbc
MD5 6b4fd2f0f1b06bef875c8ec92448c049
BLAKE2b-256 ba95bf856dd635cd09ca0822d189fcfb8e1cbce918760cf6bb8ca9f3789fdc33

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gprint-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for gprint-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 a3c1b7696e506c2b7f4ea0d33931dcb68ea88c5a89288b26e099d42269634fd3
MD5 0726708e2539bbff21ad72a52f904522
BLAKE2b-256 5e7c3f838ac5576e89fee1e3ef1d543b7a238f0a1e04609d82a167b09b5bb30c

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