Relative Content

Tag Archive for pythonterminal

Replace print() output in terminal, for long strings

I have a function in python that the user can run, which can be exit by sending ctrl-c. I want to display a timer on this function, to show how long it was running for, followed by a few static messages. My current implementation of this involves a combination of 33[A, 33[K and r characters. Already works in normal cases.

How do I clear a terminal in python?

After someone is done with bidding for an item, I want to clear what they have done so that the next person to player does not know what the person before them did.