Skip to main content

Colored Output - c_out. Python print with a style!

Project description

Installation

pip install c_out

Introduction

Colored Output - c_out

You don't have to tell me how monotonous it is to use the same old print statement in python, as there is no option to format it. Moreover, we all have faced problems while debugging our code with countless print statements but no way to highlight any of it.

Well we can definitely install/import third-party packages, but some of us just prefer the old school solutions.

I have a simple, yet effective solution for you. What if I tell you, it is possible to create a custom class yourself which can format the output in the terminal?

Using this module you can directly format the output you see in your command line interface without using any external packages.
It uses ANSI Escape Codes to format the standard output.

Example Usage

c_out("Hello World")  
c_out("Hello World", Color.Text.BLUE)  
c_out("Hello World", Color.Text.RED, Color.BG.BLACK, Style.BOLD)  
c_out("Hello World", Color.Text.RED, Color.BG.BLACK, Style.BOLD, Style.STRIKETHROUGH)  
c_out("Hello World", Color.Text.RED, Color.BG.BLACK, Style.BOLD, Style.STRIKETHROUGH, Style.ITALIC) 

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

c_out-0.7.tar.gz (3.5 kB view details)

Uploaded Source

File details

Details for the file c_out-0.7.tar.gz.

File metadata

  • Download URL: c_out-0.7.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.3

File hashes

Hashes for c_out-0.7.tar.gz
Algorithm Hash digest
SHA256 b0404166804e6a293609320e5bd48e081fc59dda449f9cf41a9cbf2bbd37b37a
MD5 7a6a60cfcb4885854702b27758585055
BLAKE2b-256 57a27eb75d82b6881ae31de6089b0091e4234483ed0f346cc2d46417e7acd4f2

See more details on using hashes here.

Supported by

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