Skip to main content

Have you ever tried updating the console with text that changes multiple times a second? Remember how when you tried clearing the console with os.system calls it would make the console flash and make the text unreadable? I wrote this python module to prevent exactly that. Introducing...

ConsoleDraw

A python module to update the console without flashing.

Installation

The consoledraw module can be installed using pip.

pip install consoledraw

If that doesn't work, try this instead.

pip install git+https://github.com/Matthias1590/ConsoleDraw.git

Or, if you want to, you can clone the repo and run the following commands.

python3 setup.py build
python3 setup.py install

Demo

example.py:

from consoledraw import Console
from datetime import datetime
from time import sleep

console = Console()

format = """
    ╔══════════╗
    ║ {} ║
    ╚══════════╝
"""

while True:
    with console:
        console.print(format.format(datetime.strftime(datetime.now(), "%H:%M:%S")))

    sleep(0.5)

Demo GIF

with console:    
    console.print("Hello, world!")
    console.print("Another message!")

# is the same as

console.clear()

console.print("Hello, world!")
console.print("Another message!")

console.update()

Downloads

Downloads Downloads Downloads

Supported Operating Systems

The consoledraw module is supported on Windows, Linux and Mac.

Metadata

Release files for consoledraw 2.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for consoledraw 2.4.2
File Interpreter ABI Platform
consoledraw-2.4.2-py3.8.egg Legacy Egg format - - Details

Release files / consoledraw-2.4.2-py3.8.egg

Download URL consoledraw-2.4.2-py3.8.egg
Size 7.1 kB
Tags Egg
SHA-256 checksum
How to use checksums
1d3a505b0ac621247c33fa4ae25e52968c0642a246ce3dc6190733cd3900fc4c
BLAKE2b-256 checksum
How to use checksums
89c761a0e00e5577df079ebcb29a1015343f19abb3141419a1f690a31a50f846
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Release history Release notifications | RSS feed

This release

2.4.2 This release

1 release file

2.4.1

1 release file

2.4.0

1 release file

2.3.16

1 release file

2.3.15

1 release file

2.3.14

1 release file

2.3.13

2 release files

2.3.11

1 release file

2.3.10

1 release file

2.3.9

1 release file

2.3.8

1 release file

2.3.7

1 release file

2.3.6

1 release file

2.3.5

1 release file

2.3.4

1 release file

2.3.2

1 release file

2.3.1

1 release file

2.2.0

1 release file

2.0.2

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.1.0

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page