The Screen class lets you to do positioned writes to the dos terminal.
– Screen positioning and colors in the dos shell (and unix too)
pip install doscmd-screen
Version 1.1.0 introduces Screen.color(“txt”, fg=’white’, bg=’blue’) which returns a string that can later be printed.
Version 1.0.3 introduces thread safe window areas through the Window class.
Changes in version 1.0 include support for non-dos platforms, a visual test script, and zero-based indexing of screen positions. Since the last one is a backwards incompatible change I have upped the major version number. I don’t forsee any further backwards incompatible changes in this module.
The documentation lives at http://doscmd-screen.readthedocs.org/
Straight forward positioning and terminal colors in the terminal:
import screen # screen probably needs to be your first import. scr = Screen() scr.centerxy(scr.center, scr.middle, '((.))') scr.writexy(scr.left, scr.bottom, 'left bottom', color='black', on='red')
Works for both Windows..
..and unix-like terminals:
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, Size & Hash SHA256 Hash Help||File Type||Python Version||Upload Date|
(9.1 kB) Copy SHA256 Hash SHA256
|Wheel||py2||Nov 28, 2017|
(6.7 kB) Copy SHA256 Hash SHA256
|Source||None||Nov 28, 2017|