Skip to main content

tamcolors standardizes console color output across multiple platforms

Project description

Icon

TotalDownloads WeekDownloads Python3 License Docs Tests

about

This library standardizes console color output across multiple platforms. It also can get keyboard inputs without interrupting the console output and can run a console application at ~25 FPS.

pip install tamcolors

table tennis example

TableTennis

import tamcolors
tamcolors.examples.tabletennis.run()

basic example

BasicExample

import tamcolors
tamcolors.examples.basic.run()
import tamcolors
from tamcolors.tam_io.tam_colors import *
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, (GREEN, WHITE), "!", ("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=tam_io.tam_colors.GREEN,
                         background_color=tam_io.tam_colors.BLACK,
                         min_width=57, max_width=57, min_height=20, max_height=20)

        self.icon = tam_tools.tam_fade.tam_fade_in(surface=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, *args):

        if not self.icon.done():
            self.icon.slide()
        else:
            self.wait -= 1

        if self.wait == 0:
            tam_loop.done()

    def draw(self, tam_surface, loop_data, *args):
        tam_surface.clear()

        tam_surface.draw_onto(self.icon.peak(), 0, 0)


tam.tam_loop.TAMLoop(BootLogo()).run()

versions of Python currently supported

  • 3.9

  • 3.8

  • 3.7

  • 3.6

platforms tested on

  • Windows 10

  • Ubuntu 20.04

  • macOS 10.15.5

goals

  • add IO event bus

  • support “get_keyboard_name” on macOS - Objective-C -> C++ -> Python

  • support “key state mode” on macOS - Objective-C -> C++ -> Python

  • add SHIFT KEY and other keys

long term goals

  • build a community that builds fun terminal games

  • make and change fonts at run time

  • add .wav support

3.0.2 goals

  • clean up code

  • add more tests

  • add wiki

3.0.1 goals

  • make and change fonts at run time

  • add SHIFT KEY and other keys

3.0.0 goals

  • update tamtools

  • add SPA, LAT, GER and FRE keyboard maps

  • supports Python 3.9

  • supports Python 3.8

  • supports Python 3.7

  • supports Python 3.6

2.1.0 goals

  • update tamloop

  • update tamframe

  • add IO event bus

  • supports Python 3.9

  • supports Python 3.8

  • supports Python 3.7

  • supports Python 3.6

2.0.0 goals

  • add .wav support

  • add .wav tests

  • supports Python 3.9

  • supports Python 3.8

  • supports Python 3.7

  • supports Python 3.6

what defines a release?

  • x.?.? - tamcolors has matured to a new level of capability.

  • ?.x.? - Backwards compatibility was broken for most programs.

  • ?.?.x - Most programs should still run in this release.

  • All releases can have new features, bug fixes, depreciation and new tests.

versions

1.3.0

  • 2/5/2021

  • fixed exit clear

  • added wait_key

  • added frame_done

  • added multi console example

  • added key state keyboard mode Only for Windows

  • made tam_loop multi console friendly

  • renamed items from buffer to surface

  • updated tamcolors icon

  • supports GER_GERMAN, FRE_FRENCH, SPA_SPANISH, LAT_SPANISH, … Keyboards - Only for Windows and Linux

  • supports Python 3.9

  • supports Python 3.8

  • supports Python 3.7

  • supports Python 3.6

1.2.0

  • 11/3/2020

  • added tam_loop profiler

  • added TCP IO (dummy console)

  • save/rest Windows buffer size on exit

  • cleaned up c/c++

  • added sandy check examples

  • added new color mode “MODE_16_PAL_256”

  • added “preferred_mode”argument to TAMLoop

  • cleaned up win dll selection process

  • added .ci testing

  • supports Python 3.9

  • supports Python 3.8

  • supports Python 3.7

  • supports Python 3.6

1.1.1

  • 10/10/2020

  • added tam utils

  • added compress utils module

  • added encryption utils module

  • added identifier utils module

  • added log utils module

  • added transport optimizer utils module

  • added immutable cache utils module

  • added slow tests

  • added tcp utils module

  • fixed macOS terminal cursor

  • fixed windows missing dll

  • added dependencies licences

  • supports Python 3.9

  • supports Python 3.8

  • supports Python 3.7

  • supports Python 3.6

1.1.0

  • 9/7/2020

  • fixed macOS!

  • broke up IO into drivers

  • added terminal identifier

  • added 256 color mode

  • added rgb color mode

  • added RGBA

  • added Color

  • supports Python 3.8

  • supports Python 3.7

  • supports Python 3.6

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)

  • supports Python 3.8

  • supports Python 3.7

  • supports Python 3.6

  • dropped support for Python 3.5

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

Uploaded Source

Built Distributions

tamcolors-1.3.0-cp39-cp39-win_amd64.whl (677.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

tamcolors-1.3.0-cp39-cp39-win32.whl (675.8 kB view details)

Uploaded CPython 3.9 Windows x86

tamcolors-1.3.0-cp39-cp39-macosx_10_9_x86_64.whl (668.1 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

tamcolors-1.3.0-cp38-cp38-win_amd64.whl (677.3 kB view details)

Uploaded CPython 3.8 Windows x86-64

tamcolors-1.3.0-cp38-cp38-win32.whl (675.9 kB view details)

Uploaded CPython 3.8 Windows x86

tamcolors-1.3.0-cp38-cp38-macosx_10_9_x86_64.whl (668.1 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

tamcolors-1.3.0-cp37-cp37m-win_amd64.whl (677.2 kB view details)

Uploaded CPython 3.7m Windows x86-64

tamcolors-1.3.0-cp37-cp37m-win32.whl (675.8 kB view details)

Uploaded CPython 3.7m Windows x86

tamcolors-1.3.0-cp37-cp37m-macosx_10_9_x86_64.whl (668.1 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

tamcolors-1.3.0-cp36-cp36m-win_amd64.whl (677.2 kB view details)

Uploaded CPython 3.6m Windows x86-64

tamcolors-1.3.0-cp36-cp36m-win32.whl (675.8 kB view details)

Uploaded CPython 3.6m Windows x86

tamcolors-1.3.0-cp36-cp36m-macosx_10_9_x86_64.whl (668.1 kB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: tamcolors-1.3.0.tar.gz
  • Upload date:
  • Size: 3.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for tamcolors-1.3.0.tar.gz
Algorithm Hash digest
SHA256 e944c843eec4ecd5ac4e77e90a738da4d4f3c922abac9c067460b782dbfb4f87
MD5 534d0c8dcb8e4a994f0f8e7ac50ba77a
BLAKE2b-256 9c4e08f1f721607ad8584757f0a3a26e6fb02965cc343e7b544d4a30b878265e

See more details on using hashes here.

File details

Details for the file tamcolors-1.3.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: tamcolors-1.3.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 677.2 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for tamcolors-1.3.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 8d5f0927818e7671d6c79ca340be3bb11eba4393b418f30aa1d0e889cd29b8c5
MD5 57e0424286acaed6e7821fb51e0ae74d
BLAKE2b-256 6d3f015b7a78c0fc293cebbf0629dd262522df8bbedaad0adf327bc0836b3d1c

See more details on using hashes here.

File details

Details for the file tamcolors-1.3.0-cp39-cp39-win32.whl.

File metadata

  • Download URL: tamcolors-1.3.0-cp39-cp39-win32.whl
  • Upload date:
  • Size: 675.8 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for tamcolors-1.3.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 97f373b414447f404d4831392ad900ebdd71a4f0944badaf2b530e9ec86afa91
MD5 d3674240f37258e054d4445f59df2edb
BLAKE2b-256 f89b55241cb0ec5bb44371d45ffbde17c35ddf053ab7e5b7ed36aad3b612c62c

See more details on using hashes here.

File details

Details for the file tamcolors-1.3.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: tamcolors-1.3.0-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 668.1 kB
  • Tags: CPython 3.9, 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/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0

File hashes

Hashes for tamcolors-1.3.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 406a0b33341100f04855e552af7b24a099481f3dc5b613a731dc2d5c12dd5f80
MD5 f8da61f458b0a1df3d3b720c3f9e694b
BLAKE2b-256 3da0c9bf0b123e80f87248b29210f22265256ca2b513d76058f10b11b4a12d84

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamcolors-1.3.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 677.3 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for tamcolors-1.3.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f415eee8e22f6efb123fef8f53efaf9ba5a21dcf0def4fe8f076268767dd5061
MD5 d5d372d3f18f0e4643347997fb5d5c30
BLAKE2b-256 e7d8df487311a3d6a9eaab44a4a75eeccfd26a244a454eb805f950a0f74e8b3c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamcolors-1.3.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 675.9 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for tamcolors-1.3.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 0932aeadfe73580a5c9fecad6fa8a705a197e38349616e0f753f1fc2b7c32575
MD5 02c1096dc4cbaa4879c181ff0ab2ced3
BLAKE2b-256 b637f6a33d20a803475fbfad1e22e60b086a559936cb682bbffee15dcaebcb96

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamcolors-1.3.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 668.1 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/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0

File hashes

Hashes for tamcolors-1.3.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1e466f6caef92cf1f95bd77a1f15747f6019df32dc3da7330189a28a14b9c788
MD5 508c17a0f172a1c3ea457cd4b33831bb
BLAKE2b-256 d571695d674076cafea66a67269947b3abf066608a388e9f063dde8ddd5d8807

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamcolors-1.3.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 677.2 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for tamcolors-1.3.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 3bd7295ef17a270383af9e8422326b00ac9861ceeb1e3e82e2777a513c53f081
MD5 a4a0d6900e4f1a8ea7103f5c684f289a
BLAKE2b-256 3cc0c394e57ab77277beac40cc48a142adbc1ceef841e912950ba9edbd968bae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamcolors-1.3.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 675.8 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for tamcolors-1.3.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 2bb946ee8f02cf29e96639ff03c252035745f3aa43ef059234a2ee9d403697a1
MD5 7ed3996257b7ce164687d4d7f36b462f
BLAKE2b-256 2e973f911c3f2788871f6514e6528ee40d3924e9f58a0032407fb84723c315bd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamcolors-1.3.0-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 668.1 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/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0

File hashes

Hashes for tamcolors-1.3.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5dac1e28718914b3478db818abf6ebbccab5cace0f2c1dc4daa75707fe927739
MD5 172ab157360c9e86ee0bff2f9be58a86
BLAKE2b-256 aa86bb31756c9200886f82259861afbfc163931a6ade058ef191744c8842865c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamcolors-1.3.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 677.2 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for tamcolors-1.3.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 e1084401aba53508e5fb07079fa2270980ac696e0ba5b5aa6c3a4f7b7c007101
MD5 775d90863ea07026210c534a9b0eaa0a
BLAKE2b-256 81a633e3eab249d1b0fa18fd5c454771f940e475f2f5480f3d357dcf3f07d56b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamcolors-1.3.0-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 675.8 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for tamcolors-1.3.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 84a81f01c2e93bcc5cc395c74b8c47474e5c9200685879fbd9a4f5360b55a3fa
MD5 a7c4c68364aae686cf357623726c7c92
BLAKE2b-256 833d4a2433d1fe23987f3e3a202d38fb9737743558d41921f0f7012af2390ca9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamcolors-1.3.0-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 668.1 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/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0

File hashes

Hashes for tamcolors-1.3.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1e30198b32780239bd4023fe79fdbe7ec14ac18d39654e50b7b4908ca9dcc6ee
MD5 ef705e54bf929a4d8147e884184a7089
BLAKE2b-256 68f7c84553511e8f5a701eb48841f3e928a372dd091a0f4fe9e4065c0905ec06

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