Skip to main content

Python library for ansi consoles.

Project description

PythonAnsiConsole

Console library for Python which use pure ANSI.

##What can it do?

  • Get size of terminal / console.

  • Set terminal / console title.

  • Get / Set cursor position.

  • Hide / Show cursor.

  • Change foreground / background color.

  • Clear console / terminal.

  • Draw unfilled / filled triangles, quads, rectangles.

  • Draw windows / boxes. (around text or whatever)

  • Simple progress bars.

  • And more!

##Support Supported operating systems:

  • Windows 10
  • Linux (any)
  • MacOS

##Examples You can find all examples in example folder. (After installation you don't need to worry about add_path.py)

Good way to keep your console / terminal readable:

from console import Console

c = Console()
try:
    """
    Your code here.
    """
finally:
    c.cursor.show()
    c.reset()

###Style and SGR You can specify style by Code row in table below. You can find original article at this wiki page. Usage:

from console import Console

c = Console()
c.style(1, 3, 4)
print('Hello World!')
c.reset()

alt text

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for PythonAnsiConsole, version 1.6
Filename, size File type Python version Upload date Hashes
Filename, size PythonAnsiConsole-1.6.tar.gz (7.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page