Colourz adds coloured text output and spinners to a Windows shell (Powershell / CMD)
Project description
colourz
Colourz adds coloured text output and spinners to a Windows shell (Powershell / CMD)
Installation
$ pipenv install colourz
Usage
import colourz # Print in bold text print(colourz.bold("Bold text")) # Print text in red print(colourz.normal("Red text", "RED")) # Print text in bold red print(colourz.bold("Bold red text", "RED")) # Use Bullets when waiting on a long task import time def main(): s = colourz.Bullets() print("Doing long task...") s.start() long_task() s.stop() print("Success!") # CAUTION: As Bullets is threaded, we need to watch out for exceptions def long_task(): raise LongTaskError def main(): s = colourz.Bullets() print("Doing long task...") s.start() try: long_task() msg = "Success!" except LongTaskError: msg = "Fail!" finally: s.stop() print(msg)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size colourz-1.0.4-py2.py3-none-any.whl (3.9 kB) | File type Wheel | Python version py2.py3 | Upload date | Hashes View |
Filename, size colourz-1.0.4.tar.gz (3.9 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for colourz-1.0.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e3c40188ccb72a3a01c0745ec85eff141b6a623e7270de09ed286e138af8bbc |
|
MD5 | c08d728ec5a54a451191e1e56639a2b8 |
|
BLAKE2-256 | df5a7b3842f674b01730f22cf7559c249d03f8bcc4954e19733b8f45397e04f2 |