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
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=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

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

  • make and change fonts at run time

goals

  • support Solaris

  • support FreeBSD

1.1.1 goals

  • save/rest Windows buffer size on exit

  • clean up Windows C/C++

  • make tam utils

  • add TCP IO (dummy console)

  • add .wav support

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.

  • Any release older than 1.0.2 does not fallow this release pattern.

versions

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

  • dropped support for Python 3.5

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

Uploaded Source

Built Distributions

tamcolors-1.1.0-cp38-cp38-win_amd64.whl (104.7 kB view details)

Uploaded CPython 3.8 Windows x86-64

tamcolors-1.1.0-cp38-cp38-win32.whl (103.6 kB view details)

Uploaded CPython 3.8 Windows x86

tamcolors-1.1.0-cp38-cp38-macosx_10_9_x86_64.whl (84.2 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

tamcolors-1.1.0-cp37-cp37m-win_amd64.whl (104.6 kB view details)

Uploaded CPython 3.7m Windows x86-64

tamcolors-1.1.0-cp37-cp37m-win32.whl (103.5 kB view details)

Uploaded CPython 3.7m Windows x86

tamcolors-1.1.0-cp37-cp37m-macosx_10_9_x86_64.whl (84.1 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

tamcolors-1.1.0-cp36-cp36m-win_amd64.whl (104.6 kB view details)

Uploaded CPython 3.6m Windows x86-64

tamcolors-1.1.0-cp36-cp36m-win32.whl (103.5 kB view details)

Uploaded CPython 3.6m Windows x86

tamcolors-1.1.0-cp36-cp36m-macosx_10_9_x86_64.whl (84.1 kB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: tamcolors-1.1.0.tar.gz
  • Upload date:
  • Size: 11.2 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.1.0.tar.gz
Algorithm Hash digest
SHA256 022b1df86031bd330ad483a8f455c6c0a0066238237b4b4a29e2ea4f77451170
MD5 3c71970f6f857e6dcc0891cb60d5dd1a
BLAKE2b-256 fef06cd4774d5013378752326b111c09e8361e9e7125a0ef305908bdcc514893

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamcolors-1.1.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 104.7 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.1.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 3850997246fd29a06f2e6ceb3eb02a4f2ebc41ddb1682a9bb1232bdf691b1f0d
MD5 d410eb52d0e69eeed9f15f93a88086ea
BLAKE2b-256 195e0c879b1bd08a3b84dfe7cfa6b11c9f27037f4520408924392a513e4e1080

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamcolors-1.1.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 103.6 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.1.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 2bd4cb991a755b6f1f376545c0ae51c8a3cea6a187e8c87862e5eb660dc81028
MD5 65324022d8c9874e07baf414cc1cc452
BLAKE2b-256 84cd35636935c0100f853a07f753d0481525542199dc4520d7524148361472e2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamcolors-1.1.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 84.2 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/39.0.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.7

File hashes

Hashes for tamcolors-1.1.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0b86c787647257fa0426fd1a34de9a8b6d3441f277b46430118d3776be54c8be
MD5 9af3e5e52381ed5643d1e0ae7f57a373
BLAKE2b-256 80973b3faa1709e590cf9fdd681f2204bbc62e0d507dee7859e4e4be718084ac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamcolors-1.1.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 104.6 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.1.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 57fe4fe88c841b1b4841ec893f5958daac308a3ba14a9fff227b4d625aaf7f43
MD5 744ebf4335baabbde3a9c8acf13c9c59
BLAKE2b-256 1859e53ae51f3246d022894da2a14758e5e8daad2ff0237442d623c544a971f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamcolors-1.1.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 103.5 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.1.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 4a8918c2913338ebbf16d83d3e840f7ac44f1db84c8c60b3370e245f74ec4b47
MD5 91e6f6440b15a6e6a95d637089fcfcae
BLAKE2b-256 c47014ab5238363647f260c4035ea028da4d5e40ee8ed7fd4ad86f6783a50d52

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamcolors-1.1.0-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 84.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/39.0.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.7

File hashes

Hashes for tamcolors-1.1.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fa199c4873e84e3f1425b0f401288ffd1ecb62faab5c73738814ea273d609c49
MD5 a50b3fd5b8c6cec14f65b0d024c7f012
BLAKE2b-256 b3be2ce600f688e8a726a2721f63f3c281b1789d71f880c5333814f9819bc835

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamcolors-1.1.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 104.6 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.1.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 9d3043446ee701200c0ae960c133c9c45b8c5e6fa5e79674804cb5850e4d6c97
MD5 8840969961db599def0482d48e9de332
BLAKE2b-256 9d245659fea7b73cf93b63cfc6e1f4fc1bae7a19c6b2ceb5ad00d948e2a3c46d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamcolors-1.1.0-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 103.5 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.1.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 f4fa2910b81a0f1aa72b4951cfdd6201ce090994111d0e096bdf9ab382c80122
MD5 d71e53a38687bbede50de97a6f2d8fe1
BLAKE2b-256 6eaaffe0747b6060c8781cb1403f4b69496f34699e26ae0d0cb6e4b8df26df27

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tamcolors-1.1.0-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 84.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/39.0.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.7

File hashes

Hashes for tamcolors-1.1.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cf25fcda4d41d8cd4d553d9cb653bedd7e109e543543822e626135cd3b814eff
MD5 726fcd0c7e9f7e78f34a7aea3327b780
BLAKE2b-256 6b3f312cae0cb3f1499216b27fd9783c01ce6eef4ff4dedce3beff5d5dba64a3

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