None
Project description
SCPrint
(Simple Colored Print
)
Description
SCPrint is a Python 3 module aiming to make it simple and easy to use colors in your python projects. This is achieved by overriding the built-in python print function with one supportive of colored outputs, yet retaining the core functionality of the built-in print function, for example: Line Endings: end=
, Separators: sep=
and Flushed Outputs: flush=
. SCPrint is able to replace the built-in print function without creating any problems with your preexisting programs and scripts.
Installation
$ python -m pip install scprint
Usage
# To override the built-in print function use (Recommended):
from scprint import print
print("Hello World!", color="Blue", bcolor="White")
# The print function will still work normally without colors:
print("Hello World!")
# You can still use SCPrint as its own fuction (Not Ideal):
from scprint import print as newFunction
newFunction("Hello World!", color="Red", bcolor="Grey")
# To create multicolored (rainbow) text use:
from scprint import rainbow
rainbow("Multicolored Text")
Demo
from scprint import demo
demo(showBColor=False)
Features
- Control foreground and background color by setting
color=
,bcolor=
respectively. - Continue to change the object separator and line ending with
sep=
andend=
| Default =sep=" "
,end="\n"
- Create multicolored text using
scprint.rainbow()
Examples
from scprint import print
print("This text is white", color="White")
print("This text is Blue with a Yellow Background", color="Blue", bcolor="Yellow1")
from scprint import print
print(" Hello ", color="red", bcolor="blue", end="")
punctuation = "!"
print(" World", punctuation, " ", color="blue", bcolor="red", sep="")
from scprint import rainbow
rainbow("Multicolored Text!")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
scprint-1.0.0b1.tar.gz
(5.0 kB
view hashes)
Built Distribution
Close
Hashes for scprint-1.0.0b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f7a7cebd45bf8b57b48b58f5b486ec3752efdb022ce87a5e0a61b2f89edd2a3 |
|
MD5 | e99217ff10bc5b6fd5e591b60c2803c4 |
|
BLAKE2b-256 | 223e47dd3a90c83005ca66a6208ed2e0fb0aa4a88836a9a1f885de10b88a6c9f |