Skip to main content

This library standardizes console color output across multiple platforms.

Project description

Icon TotalDownloads WeekDownloads Python3 License Docs

pip install tamcolors

table tennis example

import tamcolors
tamcolors.examples.tabletennis.run()

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, ", ("default", "default"), 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()

versions of Python currently supported

  • 3.8

  • 3.7

  • 3.6

  • 3.5

platforms tested on

  • Windows 10

  • Ubuntu 20.04

  • macOS 10.15.5

long term goals

  • build a community that builds fun terminal games

  • make windows run more efficient

  • text editor

  • .ci testing

goals

  • support Solaris

  • support FreeBSD

1.1.0 goals

  • save/rest Windows buffer size on exit

  • clean up Windows C/C++

  • add RGB color mode (more than 16 colors at a time!)

  • add .wav support

  • add sound tools

versions

1.0.4

  • 8/13/2020

  • added more examples

  • bdist_wheel for Linux

  • cleaned up win_tam, uni_tam and any_tam

  • added alpha color for TAMBuffer

  • set and get rgb value of color (fixed PowerShell colors)

1.0.3

  • 7/29/2020

  • tamcolors

  • bdist_wheel for macOS

  • added more examples

  • added documentation

  • added tests for tam_basic

  • added default console colors

  • supports Python 3.8

  • supports Python 3.7

  • supports Python 3.6

  • supports Python 3.5

1.0.2

  • 7/22/2020

  • tamcolors is now very usable

  • bdist_wheel for Windows

  • added non interrupting keyboard input

  • added TAMLoop

  • added tam_tools

  • added tests

  • supports Python 3.8

  • supports Python 3.7

  • supports Python 3.6

  • supports Python 3.5

0.2.0

  • 2/1/2018

  • tamcolors proof of concept

  • added printc

  • added inputc

  • added textBuffer

  • supports Python 3.6

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.4.tar.gz (11.1 MB view details)

Uploaded Source

Built Distributions

tamcolors-1.0.4-cp38-cp38-win_amd64.whl (80.5 kB view details)

Uploaded CPython 3.8 Windows x86-64

tamcolors-1.0.4-cp38-cp38-win32.whl (79.4 kB view details)

Uploaded CPython 3.8 Windows x86

tamcolors-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl (74.0 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

tamcolors-1.0.4-cp37-cp37m-win_amd64.whl (80.5 kB view details)

Uploaded CPython 3.7m Windows x86-64

tamcolors-1.0.4-cp37-cp37m-win32.whl (79.3 kB view details)

Uploaded CPython 3.7m Windows x86

tamcolors-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl (74.0 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

tamcolors-1.0.4-cp36-cp36m-win_amd64.whl (80.5 kB view details)

Uploaded CPython 3.6m Windows x86-64

tamcolors-1.0.4-cp36-cp36m-win32.whl (79.3 kB view details)

Uploaded CPython 3.6m Windows x86

tamcolors-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl (76.3 kB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

Details for the file tamcolors-1.0.4.tar.gz.

File metadata

  • Download URL: tamcolors-1.0.4.tar.gz
  • Upload date:
  • Size: 11.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.4

File hashes

Hashes for tamcolors-1.0.4.tar.gz
Algorithm Hash digest
SHA256 d75091a5f199a216cbad422c202a100187218193a04d61cbc1e85e8305586c40
MD5 e9475d76f00b63613393aa61856281d1
BLAKE2b-256 3924fbab005403656ff46326b3b4edbe7953d8a33e51135cfee9c34ff7491121

See more details on using hashes here.

File details

Details for the file tamcolors-1.0.4-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: tamcolors-1.0.4-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 80.5 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.4

File hashes

Hashes for tamcolors-1.0.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 53de1fb0a64c39868a38bed7b4711e15549a7234fac6276a895fec4d8f0cfcd9
MD5 72759fd048899941946458af9281a98e
BLAKE2b-256 a49db1cc3e382a512d45897722e9c3a35893f24603b35e6d7fba61efcf51cc67

See more details on using hashes here.

File details

Details for the file tamcolors-1.0.4-cp38-cp38-win32.whl.

File metadata

  • Download URL: tamcolors-1.0.4-cp38-cp38-win32.whl
  • Upload date:
  • Size: 79.4 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.4

File hashes

Hashes for tamcolors-1.0.4-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 f4bd1961fe9db9a60a54263bd232391050d0c5ca4753a7eab0cd7632a82fe85a
MD5 b1e018d52305b4967c102ab6f6ea8513
BLAKE2b-256 a09f5107f33e5b9e3fe0a178e4595f2523e8eb5a0e7c3f07884fd98b7e11457a

See more details on using hashes here.

File details

Details for the file tamcolors-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: tamcolors-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 74.0 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.1

File hashes

Hashes for tamcolors-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cba73f43cc96a18274eb3ce83afa9bec5a67783265d2a25188b64de53c8ce40d
MD5 b9d35d9d3f5fb749b1e680af50237ae7
BLAKE2b-256 dba72d61669161f873a6049688acdbb7968094fa32eda49a7204b752677ac2a1

See more details on using hashes here.

File details

Details for the file tamcolors-1.0.4-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: tamcolors-1.0.4-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 80.5 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.4

File hashes

Hashes for tamcolors-1.0.4-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 08348d9660f2bb6421164cce05fde16e9b0d55338b7af9ee8d4cc1b653a6e8a3
MD5 a69f58b8ce01efea8dbe8c65d7f5cff1
BLAKE2b-256 6f2fafb52368e5c6bd98687958c8154ec3d3b57442d63fff2277c32cb8701940

See more details on using hashes here.

File details

Details for the file tamcolors-1.0.4-cp37-cp37m-win32.whl.

File metadata

  • Download URL: tamcolors-1.0.4-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 79.3 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.4

File hashes

Hashes for tamcolors-1.0.4-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 d73fb0fdfe3fca15b0172315b22078f9cbc8f600d69e45249f7da161b64a3c11
MD5 b6d895aa4b4bac11785ae8919f83065e
BLAKE2b-256 5747168ca6ad21f713c9000067e67088c456174acce083dd91050dd2c284d4ee

See more details on using hashes here.

File details

Details for the file tamcolors-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: tamcolors-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 74.0 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.1

File hashes

Hashes for tamcolors-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7257859bc7e5e28a0cedffa126e851cc734f09d29c62062e9cd91e0f572f7f89
MD5 aa88b1373ab3b9f14f4dae07a7afcb6d
BLAKE2b-256 50cbcc9023793f2b4326b4d1fabc8cb309f865532d8c93a1084de5742dd3634b

See more details on using hashes here.

File details

Details for the file tamcolors-1.0.4-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: tamcolors-1.0.4-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 80.5 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.4

File hashes

Hashes for tamcolors-1.0.4-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 dc11e30bd43c7b48d8320d40009ce8376a0a953d7f2e2a2953a30b65593e717e
MD5 cd064f5ed27b2087c8255b736eeeda92
BLAKE2b-256 34ab541c82978681d18e8d2c00729e3cc9faa862376028a1308cd91019d649af

See more details on using hashes here.

File details

Details for the file tamcolors-1.0.4-cp36-cp36m-win32.whl.

File metadata

  • Download URL: tamcolors-1.0.4-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 79.3 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.4

File hashes

Hashes for tamcolors-1.0.4-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 2df89108a156ede233a5a82a9e0116e361349da61ec89c634d7637d7467949fc
MD5 a86e6d2dbc8eafc096b37a5ef2e381c5
BLAKE2b-256 2ce272bbedde8f869f26d27b119b52cce433ade42ffdd161a28e883a251e0ec3

See more details on using hashes here.

File details

Details for the file tamcolors-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: tamcolors-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 76.3 kB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.1

File hashes

Hashes for tamcolors-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f0935b951514e4b2e88eec16aadf9335fe39d45f1c107bf667c7037712fec86f
MD5 c5cd6fe58a313fac8ed08fbbcc9dcbfe
BLAKE2b-256 455730fb0548e51d9df8b952a2389cc85e203735c7bcb30205eeefb5f721dfe2

See more details on using hashes here.

Supported by

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