diff options
author | Santo Cariotti <sancn@live.com> | 2017-07-20 13:24:34 +0200 |
---|---|---|
committer | Santo Cariotti <sancn@live.com> | 2017-07-20 13:24:34 +0200 |
commit | 6d1aff6894408c89d7a549076293fe011e475eb0 (patch) | |
tree | e19e40b5d667b8281331a982be6a0c067cd5e8fe /listcommands.py | |
parent | c95062f5ac0b16dcb0a1c5f1c3fc5762112ff371 (diff) |
added get comand
Diffstat (limited to 'listcommands.py')
-rw-r--r-- | listcommands.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/listcommands.py b/listcommands.py index 136d214..f93c3d7 100644 --- a/listcommands.py +++ b/listcommands.py @@ -4,24 +4,25 @@ from classes import Colors class ListCommands(object): info = { - "info" : "this is stout", - "set" : "set a value", + 'info' : 'this is stout', + 'set' : ['set a value', 3], } commands = { - 'quit' : None, + 'quit' : None, #quit and exit do same thing + 'exit' : None, 'clear' : None, - 'set' : ['user', 'host'], - 'get' : None + 'set' : ['user'], + 'get' : ['user', 'user?', 'host', 'port'] } @staticmethod def err(err, info = ''): if err == 'keyword': - sys.stderr.write(Colors.red + "keyword inesistente\n" + Colors.black) + sys.stderr.write(Colors.red + 'keyword inesistente\n' + Colors.black) elif err == 'wrong': - sys.stderr.write(Colors.red + "sintassi comando errata\n" + Colors.black) + sys.stderr.write(Colors.red + 'sintassi comando errata\n' + Colors.black) elif err == 'personal': - sys.stderr.write(Colors.red + str(info) + "\n" + Colors.black) + sys.stderr.write(Colors.red + str(info) + '\n' + Colors.black) else: pass |