Skip to main content

print with color

Project description

TColorP

GitHub code size in bytes linux windows

print with color.

from TColorP import TColorP, TColor

tcp = TColorP()
tcp.success('success')
tcp.error('error')
tcp.warning('warning')
tcp.normal('normal')

tcp.formatColor([TColor.method_normal, TColor.foreground_cyan])
print('hello')
tcp.formatColor([TColor.method_normal])
print('TColorP')

view

how to use

from TColorP import TColorP, TColor

tcp = TColorP()

# print success info 
tcp.success('success')
# print error info
tcp.error('error')
# print warning info
tcp.warning('warning')
# print normal info
tcp.normal('normal')

# print normal Style
print(tcp.normalStyle)

# change normal style
tcp.normalStyle = [TColor.method_highlight,TColor.foreground_red]
tcp.normal("normal")

# change normal style once
tcp.normal('normal once',style=[TColor.method_highlight,TColor.foreground_red])

# format color
tcp.formatColor([TColor.method_normal,TColor.foreground_red])
print('this will change color with red')

# print suppos method and color
print(TColor())
# method_normal=0,method_highlight=1,method_underline=4,method_reverse=7
# foreground_black=30,foreground_red=31,foreground_green=32,foreground_yellow=33,foreground_blue=34,foreground_fuchsia=35,foreground_cyan=36,foreground_white=37
# background_black=40,background_red=41,background_green=42,background_yellow=43,background_blue=44,background_fuchsia=45,background_cyan=46,background_white=47

License

MIT License,Thanks!

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

tColorP-0.0.2.linux-x86_64.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tColorP-0.0.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file tColorP-0.0.2.linux-x86_64.tar.gz.

File metadata

  • Download URL: tColorP-0.0.2.linux-x86_64.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for tColorP-0.0.2.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 d9c64e8ce7d92125f7ce612cfa32cd2545ce85c900d03281a637cb0abbf49f85
MD5 c7efff2f00f804e725d2abd98ff3130a
BLAKE2b-256 4a46670e5a874ec8c957a02bb8f30ee53a0c2c28fe2c98c71cda1c70f83bf165

See more details on using hashes here.

File details

Details for the file tColorP-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: tColorP-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for tColorP-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 62c3b0541458a20b8fc5094ae3a180029ac1a0d5cc1554ad116d73e8920bfe4b
MD5 e69b0ad3fb7e6057d95ccc5d224d648d
BLAKE2b-256 ba95f5488ab5caa31c07b4a28187b8ca00ffc2275cc95734aac2594b3bbc3236

See more details on using hashes here.

Supported by

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