Skip to main content

A simple python package to print colors in terminal using simple markup syntax

Project description

Colourful Console


Introduction

A simple python package to print colors in terminal using simple markup syntax

Installation

pip install colourful-console

Basic Usage

import colourful_console as console

console.init()

text = 'What is your <b>name</b> :'
name = console.read_line(text)

console.clear()

console.write_line(f'Your name is <g>{name}</g>')

console.title('Press enter to exit..')
input()

More on titles

import colourful_console as console

# to set a simple title
console.title('This is a simple title')

# to set a title with multiple dynamic data
console.set_title(
    lang='python', 
    version=3, 
    foo='bar'
)

# Please note, when the python program exits 
# then the custom title will also vanish and
# be replaced with the previous title
# that was before running the python program

Todo

  • Add more colors
  • Add uniqe textstyling like underline, bold, strikethrough
  • Add custom styles for specifi platform and command line apps

Note

The terminal in unix and max are much more capable and better to show colors than window's cmd and powershell.

Microsoft released a new terminal which is as capable to show colors like unix/mac terminals named terminal on Microsoft store, you can use that terminal to show fancy styles in window platform

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

colourful-console-1.0.1.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file colourful-console-1.0.1.tar.gz.

File metadata

  • Download URL: colourful-console-1.0.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for colourful-console-1.0.1.tar.gz
Algorithm Hash digest
SHA256 88c7a979652262da5c2bf9eb96ce26832875939c8635280bb5d99bd3d3dcaea4
MD5 3e5e6ba7882e8d5091a516393546ad55
BLAKE2b-256 15d4d103b0578471a86f53b3c9d4da966aefea7a502c9be76a410b8d79f7e2fe

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