From b085c6b9cabb2a4da62f32917e87b6a833f35d91 Mon Sep 17 00:00:00 2001 From: ubuntu Date: Tue, 4 Dec 2018 16:44:41 +0800 Subject: [PATCH] update ssview --- web/ssview.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/ssview.py b/web/ssview.py index 8e1f2670..48f31f18 100755 --- a/web/ssview.py +++ b/web/ssview.py @@ -13,7 +13,8 @@ import time from prettytable import PrettyTable -cp = 'clear' if 'linux' in sys.platform else 'cls' +scroll = False +clear = lambda: os.system('clear' if 'linux' in sys.platform else 'cls') def sscmd(address): while True: @@ -57,7 +58,8 @@ def sscmd(address): "%d%%" % (float(i["hdd_used"]) / i["hdd_total"] * 100), ] ) - os.system(cp) + if scroll is True: + clear() print(ss) time.sleep(1)