Skip to main content

Cool Console Prompt - Windows console customization library

Project description

CConsole (Cool Console Prompt)

A Windows console customization library for Python. Enable VT100 sequences, customize cursor, disable mouse interaction, lock resize, hide scrollbars, and apply blur effects.

Installation

pip install CConsole

Or install from source:

pip install -e .

Quick Start

from CConsole import Console

console = Console()
console.init()

Usage

Basic Initialization

from CConsole import Console

console = Console()
console.init()

Method Chaining for Features

from CConsole import Console

console = Console()
console.init().enable_vt().set_thin_cursor().disable_mouse_interaction().lock_console_resize().hide_console_scrollbar()

Individual Feature Control

console = Console()
console.init()
console.enable_vt()
console.set_thin_cursor()
console.enable_blur_behind()
console.set_title("My App")

Available Methods

Method Description
init() Initialize console handles
enable_vt() Enable VT100 terminal processing
disable_vt() Disable VT100 terminal processing
set_thin_cursor(size, visible) Set thin cursor
set_block_cursor() Set block cursor
hide_cursor() Hide cursor
show_cursor() Show cursor
disable_mouse_interaction() Disable mouse input
enable_mouse_interaction() Enable mouse input
lock_console_resize() Lock window resize
unlock_console_resize() Unlock window resize
hide_console_scrollbar() Hide scrollbar
enable_blur_behind(gradient_color) Enable blur effect
disable_blur_behind() Disable blur effect
set_title(title) Set console title
clear() Clear console
reset() Reset console to defaults
set_size(width, height) Set buffer size
move_cursor(x, y) Move cursor position
get_hwnd() Get window handle
get_output_handle() Get output handle
get_input_handle() Get input handle

Examples

Custom blur effect:

from CConsole import Console

console = Console()
console.init(blur_behind=False)
console.enable_blur_behind(gradient_color=0x80000000)

Reset everything:

console.reset()

Access raw structures:

from CConsole import COORD, CONSOLE_SCREEN_BUFFER_INFO

Requirements

  • Windows OS
  • Python >= 3.7

License

MIT

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

cconsole-1.0.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

cconsole-1.0.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file cconsole-1.0.0.tar.gz.

File metadata

  • Download URL: cconsole-1.0.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for cconsole-1.0.0.tar.gz
Algorithm Hash digest
SHA256 513751c8a9f472815f6d63f160a03040fe97a6045d8e79fe48f123f294f53409
MD5 f60d32e0a3f9140a904c45a1cb545d49
BLAKE2b-256 23ad586d144d05205574a7dcf8486475abfb9b2aeed8169ee355d64b3c14246e

See more details on using hashes here.

File details

Details for the file cconsole-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: cconsole-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for cconsole-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d1079ecd94e5953aa9a827e5b55e74fd69e519e6179848ec06f31850fd0e4ed
MD5 ac6c44df8d1938dff19132f14364972c
BLAKE2b-256 894c15b272952cef7c9ba76d851a27e918691968d8f5191975655e221608ac65

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