Skip to content Skip to sidebar Skip to footer

How Do Programs Overwrite Previous Lines Of Output?

Programs such as vim, top, or alsamixer output multiple lines of text and somehow manipulate lines of text that have already been written. I know about writing the \r character to

Solution 1:

You need to look at the python curses library.

The curses module provides an interface to the curses library, the de-facto standard for portable advanced terminal handling.

While curses is most widely used in the Unix environment, versions are available for DOS, OS/2, and possibly other systems as well. This extension module is designed to match the API of ncurses, an open-source curses library hosted on Linux and the BSD variants of Unix.

Post a Comment for "How Do Programs Overwrite Previous Lines Of Output?"