1

I am trying to create a spigot-like interface in python. Here is what I've come up with so far:

from blessed import Terminal
import time

print("pre-init")
term = Terminal()
print("post-init")

line = term.get_location(timeout=5)[0]

print(term.move_xy(0, term.height - 1), end="")
while True:
    time.sleep(0.2)
    with term.location(0, line):
        print("DATA TIIIIIME")
        line+=1

This video illustrates the problem with this approach terminal

How can I keep the prompt at the bottom of the screen without it getting overwritten when the text reaches the bottom of the screen? I want it to scroll up like normal console output, not overwrite other data

martineau
  • 119,623
  • 25
  • 170
  • 301
Gradyn Wursten
  • 118
  • 2
  • 18

0 Answers0