Skip to main content

Terminal Tools for python

Project description

Colored Terminal

* Python support for colored text in terminal
from cterminal import *

your_fg_color = getfgfromrgb(r, g, b)
your_bg_color = getbgfromrgb(r, g, b)
"""@params for getfgfromrbg()/getbgfromrgb()
 - r, g, b:         Required, type(Int)
"""

cprint(style.RED + "test")
"""@params for cprint()
 - string: 			Required (can be multiple strings)
 - separator: 		Optional, default is " "
 - end: 			Optional, default is "\n"
 - file:			Optional, default is sys.stdout
 - flush:			Optional, default is False
"""

cinput(style.RED + "test-input >> ")
"""@params for cinput()
 - prompt:          Required (can be a string concatenate)
"""

# Only for Windows
cmd.setname("NAME") # Set the window title
cmd.showcursor() # Hide the cursor
cmd.hidecursor() # Show the cursor
cmd.startcursorblinking() # Start the cursor blinking mode
cmd.stopcursorblinking() # Stop the cursor blinking mode
cmd.createscreenbuffer() # Create a new screen
cmd.switchtomainscreenbuffer() # Switch to the main screen

Supported

Platform Colors Terminal Tools
Windows Yes Yes
Linux Yes No

Builtin styles

Foreground ...
BLACK BLACK_BRIGHT
RED RED_BRIGHT
GREEN GREEN_BRIGHT
YELLOW YELLOW_BRIGHT
BLUE BLUE_BRIGHT
MAGENTA MAGENTA_BRIGHT
CYAN CYAN_BRIGHT
WHITE WHITE_BRIGHT
Background ...
BG_BLACK BG_BLACK_BRIGHT
BG_RED BG_RED_BRIGHT
BG_GREEN BG_GREEN_BRIGHT
BG_YELLOW BG_YELLOW_BRIGHT
BG_BLUE BG_BLUE_BRIGHT
BG_MAGENTA BG_MAGENTA_BRIGHT
BG_CYAN BG_CYAN_BRIGHT
BG_WHITE BG_WHITE_BRIGHT
Font Style
BOLD
UNDERLINE
REVERSED
Output Params
RESET

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

cterminal-1.5.0.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file cterminal-1.5.0.tar.gz.

File metadata

  • Download URL: cterminal-1.5.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.1 requests/2.25.1 setuptools/57.4.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for cterminal-1.5.0.tar.gz
Algorithm Hash digest
SHA256 b871374b5519539f064f3f51d513ad907e3c68163a8f54d72e03bb876b4394d7
MD5 fd5167b377276889f1b5c38ac4520b9a
BLAKE2b-256 6ac07fbdd4f097c113708020a3c294a0a14359a192f44820e585f3a6e94fd710

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