Skip to main content

Print color output in IDLE, powershell, and terminal.

Project description

clrprint v1.0

Generic badge
made-with-python Generic badge PyPI license PayPal

  • Colorful output
  • Work's on IDLE, windows powerShell, Linux terminal
  • Simply input() and print() with clrinput() and clrprint()
  • Basic colors only. Red, green, yellow, blue, purple, and black/white (default)
  • Flexible to print or take input only on demand (on DEBUG)

ABOUT

This clrprint is developed to print a colorful output. It has red, blue, green, yellow, purple and black/white (default) colors. It works on idle, windows power shell and terminal.

It prints with default color if given color is not in list of colors

Installation

You can install clrprint by running the following command

pip install clrprint

Usage

It is as easy as you use print() and input() in the python. Just one more parameter (clr) is added to represent color.

There are 2 functions clrprint(), clrinput(). Just pass your data to the functions with your desired color

You can use clrhelp() to print out and see how to use it.

Example:

clrprint('text1','text2',clr='red') 
clrinput('text1',clr='r')  # single letter is enough to represent color.
clrprint('text1_clr1','text2_clr2','text3_clr3','text4_clr4',clr=['r','y','g']) # prints 3 colors in same line
clrprint('ERROR:','error information','suggestions 1','suggestion2','suggestion3', clr=['r','y','g']) # print

Screenshots

Terminal:

IDLE:

Powershell:

Example Code

'''
Developed by Abhijith Boppe - linkedin.com/in/abhijith-boppe/
'''
from clrprint import *

userclr = clrinput('Enter color: ',clr='green').strip()  # take a input color
clrprint('You enterd',userclr,clr=userclr) # print it in that color

# If color not available it print's with default color (white/black)

clrhelp()  # to list out usage and available colors.

Buy Me A Coffee

License & copyright

© Abhijith Boppe, Security analyst

LinkedIn

© Dheeraj Kakkar, Software Developer

LinkedIn

Licensed under the MIT License

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

clrprint-1.0.2.tar.gz (5.6 kB view details)

Uploaded Source

File details

Details for the file clrprint-1.0.2.tar.gz.

File metadata

  • Download URL: clrprint-1.0.2.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for clrprint-1.0.2.tar.gz
Algorithm Hash digest
SHA256 5b99bd3fec12fe5a3376f7a487eade7e060c61ccd87b2231eabfd04dc25d2e3e
MD5 daf97e2501d141c3c4eda2fa0c19c334
BLAKE2b-256 0c957aa28a6e93ec1d53a92dd5b4249d8905b974a122c385dfdbf911c2ff8adb

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