From 7d8a51880e9e06fb79cc8d728382b4253246d17c Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Mon, 21 Aug 2017 19:25:48 +0200 Subject: deleted "clear shell" function --- lib/app.py | 1 - lib/classes.py | 7 +------ lib/commands.py | 4 +--- lib/listcommands.py | 1 - 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/lib/app.py b/lib/app.py index 5b0c2c8..f2c151d 100644 --- a/lib/app.py +++ b/lib/app.py @@ -59,7 +59,6 @@ class Stout(Commands): if __name__ == '__main__': - clear() app = Stout() cmd = '' while cmd != 'quit': diff --git a/lib/classes.py b/lib/classes.py index 92dfe92..1da06f3 100644 --- a/lib/classes.py +++ b/lib/classes.py @@ -1,5 +1,4 @@ import redis, os -import platform try: from .config import config as co @@ -18,11 +17,7 @@ def clear(): """ clear the window """ - nameOs = platform.system() - if nameOs == 'Linux': - os.system('clear') - else: - os.system('clear') + print('\n' * 100) class PersonalError(Exception): diff --git a/lib/commands.py b/lib/commands.py index bb317e0..db464fe 100644 --- a/lib/commands.py +++ b/lib/commands.py @@ -8,9 +8,7 @@ class Commands(object): """ this function is used for execute a command """ - if what == 'clear': - clear() - elif what == 'set': + if what == 'set': try: if cmd[1] == 'user' and cmd[2] is not None: #set name for user if len(cmd[2]) > 10: diff --git a/lib/listcommands.py b/lib/listcommands.py index c779524..987aeb5 100644 --- a/lib/listcommands.py +++ b/lib/listcommands.py @@ -19,7 +19,6 @@ Se utilizzato con il "flag" i, si possono visualizzare le info: get i host, get commands = { 'quit' : None, - 'clear' : None, 'set' : ['user'], 'get' : ['i', ['user', 'host', 'port', 'unix_socket_path', 'db'], 'todo', 'ctodo'], 'add' : None, -- cgit v1.2.3-18-g5258