This library standardizes console color output across multiple platforms.
Project description
pip install tamcolors
basic example
import tamcolors
tamcolors.examples.basic.run()
import tamcolors
tamcolors.printc("Hello", "World!", ("light blue", "white"), same_color=True)
name = tamcolors.inputc("Whats Your Name? >>> ", ("light aqua", "gray"))
tamcolors.clear()
tamcolors.printc("Hello, ", ("white", "red"), name, (2, 7), "!", ("gray", "light aqua"), sep="")
icon example
import tamcolors
tamcolors.examples.icon.run()
from tamcolors import tam, tam_tools, tam_io
class BootLogo(tam.tam_loop.TAMFrame):
def __init__(self):
super().__init__(fps=10,
char=" ",
foreground_color=2,
background_color=0,
min_width=70, max_width=70, min_height=40, max_height=40)
self.icon = tam_tools.tam_fade.tam_fade_in(buffer=tam_tools.tam_icon.get_icon(),
char=" ",
foreground_color=tam_io.tam_colors.BLACK,
background_color=tam_io.tam_colors.BLACK)
self.wait = 10
def update(self, tam_loop, keys, loop_data):
if not self.icon.done():
self.icon.slide()
else:
self.wait -= 1
if self.wait == 0:
tam_loop.done()
def draw(self, tam_buffer, loop_data):
tam_buffer.clear()
tam_buffer.draw_onto(self.icon.peak(),
*tam_tools.tam_placing.center(x=35, y=15, buffer=self.icon.peak()))
tam_tools.tam_print.tam_print(tam_buffer, *tam_tools.tam_placing.center(x=35,
y=28,
width=len("tamcolors"),
height=1),
text="tamcolors",
foreground_color=tam_io.tam_colors.LIGHT_WHITE,
background_color=tam_io.tam_colors.BLACK)
tam.tam_loop.TAMLoop(BootLogo()).run()
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
tamcolors-1.0.2.tar.gz
(40.3 kB
view hashes)
Built Distributions
Close
Hashes for tamcolors-1.0.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f5497f892446b6e415d1d73353f1589f0cd33d47870bc2c23a004160ea5cc30 |
|
MD5 | 4d0725a48baf0a8e35869a9e984f983b |
|
BLAKE2b-256 | 1c0f5eb27729e6fe8be71e8972c24317b0b5f421a92540bb23b43b4105d4139e |
Close
Hashes for tamcolors-1.0.2-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd82fef20c87f1883c5fa0e2ea293657115f9ffc7ba14c2316c9e4b226c68eaa |
|
MD5 | ea0b89f4c604fb4c2f624b11c7df0ec8 |
|
BLAKE2b-256 | 69473ed98e65188891545a027c04286e829420380d46cec2e721f0a4a7448c7b |
Close
Hashes for tamcolors-1.0.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 020be4fbb0a3829015e4f43939c97802e7d2153987fb1ee3f6f6f5a405bb89cd |
|
MD5 | f40c8881f4c1302c0f4c8a2454bf5efb |
|
BLAKE2b-256 | dec71e3e6cc2334640875cce262d56c6759086faa477f2233402d6cbd8e12251 |
Close
Hashes for tamcolors-1.0.2-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b37b19e1ab57592b285688cc3fa40e8a4d7394880def84973df5c571c1d4167 |
|
MD5 | 449adca65689dab93d031a297560a823 |
|
BLAKE2b-256 | 88a0cbd420736f49a42cd27ccdacfa1cdf12fa9dd66e33dbbee25ee8587fb2b4 |
Close
Hashes for tamcolors-1.0.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16f11a2567633a33da8d2d4a027ce72e1340915da70e23d9a96a3270cea16178 |
|
MD5 | b889c4fbbc5949a43a50e7ecad00883b |
|
BLAKE2b-256 | fb55d6a622cd5d84949182eaf11a0d2d9ecb58ba07fd862cd7eab7bc3513ef28 |
Close
Hashes for tamcolors-1.0.2-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0be48ae2bd0fc7a501d8ffc11fb5b436425973f8f9e5ad87bc535ac787ce1866 |
|
MD5 | 6c39cfb40a3f6d250afe63576bc6937f |
|
BLAKE2b-256 | 854cee3e5d5c09e5f489bd27b2f478cef5f638e99695e661efd6e03021e20a13 |