[O] Clear screen with title
This commit is contained in:
parent
f86792356e
commit
299adb8e4d
2 changed files with 7 additions and 4 deletions
|
|
@ -49,12 +49,15 @@ def printc(msg: str):
|
|||
print(color(msg + '&r'))
|
||||
|
||||
|
||||
def clear_screen():
|
||||
def clear_screen(title: str = ''):
|
||||
"""
|
||||
Clear screen using ANSI escape codes
|
||||
"""
|
||||
print('\033[2J\033[H', end='')
|
||||
|
||||
if title:
|
||||
printc(title)
|
||||
|
||||
|
||||
def redistribute_rgb(r: int, g: int, b: int) -> tuple[int, int, int]:
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue