A python module to update the console without flashing.

Overview

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.

Supported Operating Systems

The consoledraw module should be supported on Windows, Linux and Mac (although it has not been tested on Mac).

Installation

The consoledraw module can be installed using pip.

pip install consoledraw

Demo

demo.py:

from math import sin
from time import sleep

import consoledraw

console = consoledraw.Console()

x = 0
while True:
    with console:    
        for i in range(23):
            console.print("    |" + " " * round(abs(sin((x + i) * 0.05)) * 9.5) + "O") # Prints to the custom console's buffer (works the same as python's built-in print)
    
    x += 1

    sleep(1/60) 

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()
You might also like...
A string extractor module for python

A string extractor module for python

A python module for extract domains

A python module for extract domains

An URL checking python module

An URL checking python module

A multipurpose python module

pysherlock pysherlock is a Python library for dealing with web scraping using images, it's a Python application of the rendertron headless browser API

Python module and its web equivalent, to hide text within text by manipulating bits
Python module and its web equivalent, to hide text within text by manipulating bits

cacherdutexte.github.io This project contains : Python modules (binary and decimal system 6) with a dedicated tkinter program to use it. A web version

A python mathematics module

A python mathematics module

A hashtag from string extract python module

A hashtag from string extract python module

A random cats photos python module

A random cats photos python module

Pyfunctools is a module that provides functions, methods and classes that help in the creation of projects in python

Pyfunctools Pyfunctools is a module that provides functions, methods and classes that help in the creation of projects in python, bringing functional

Comments
  • The demo does not work as the demo image shows

    The demo does not work as the demo image shows

    Hi! The demo code you posted leaves successive screens with the following text: ←[0;0f before each print. Working on W10, with Python 3.9. Visual Studio Code, "externalTerminal" on launch.json.

    bug help wanted good first issue 
    opened by aqasoft 13
Owner
Matthias
I'm a self-taught python developer that's always eager to learn!
Matthias
Install, run, and update apps without root and only in your home directory

Qube Apps Install, run, and update apps in the private storage of a Qube. Build and install in Qubes Get the code: git clone https://github.com/micahf

Micah Lee 26 Dec 27, 2022
a simple function that randomly generates and applies console text colors

ChangeConsoleTextColour a simple function that randomly generates and applies console text colors This repository corresponds to my Python Functions f

Mariya 6 Sep 20, 2022
A simple, console based nHentai Code Generator

nHentai Code Generator A simple, console based nHentai Code Generator. How to run? Windows Android Windows Make sure you have python and git installed

null 5 Jun 2, 2022
Backup a folder to an another folder by using mirror update method.

Mirror Update Backup Backup a folder to an another folder by using mirror update method. How to use Install requirement pip install -r requirements.tx

null 1 Nov 21, 2022
Python Classes Without Boilerplate

attrs is the Python package that will bring back the joy of writing classes by relieving you from the drudgery of implementing object protocols (aka d

The attrs Cabal 4.6k Jan 6, 2023
A simple tool that updates your pubspec.yaml file, of a Flutter project, without altering the structure of your file.

A simple tool that updates your pubspec.yaml file, of a Flutter project, without altering the structure of your file.

null 3 Dec 10, 2021
Simple python module to get the information regarding battery in python.

Battery Stats A python3 module created for easily reading the current parameters of Battery in realtime. It reads battery stats from /sys/class/power_

Shreyas Ashtamkar 5 Oct 21, 2022
A python module to manipulate XCode projects

This module can read, modify, and write a .pbxproj file from an Xcode 4+ projects. The file is usually called project.pbxproj and can be found inside the .xcodeproj bundle. Because some task cannot be done by clicking on an UI or opening Xcode to do it for you, this python module lets you automate the modification process.

Ignacio Calderon 1.1k Jan 2, 2023
A python module to validate input.

A python module to validate input.

Matthias 6 Sep 13, 2022
A module for account creation with python

A module for account creation with python

Fayas Noushad 3 Dec 1, 2021