Skip to content

Commit 53a295e

Browse files
committed
Add a function to clear the last line of terminals
1 parent 155e76c commit 53a295e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

quark/utils/pprint.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
# See the file 'LICENSE' for copying permission.
44

55
from prettytable import PrettyTable
6+
from quark.utils.colors import bold, cyan, green, red, yellow
67

7-
from quark.utils.colors import bold, cyan, yellow, red, green
8+
9+
def clear_the_last_line():
10+
"""
11+
Clear the last line of the terminal.
12+
"""
13+
print("\033[A\033[A")
814

915

1016
def print_info(message):

0 commit comments

Comments
 (0)