add last_incomming and improve other commands

This commit is contained in:
chrys
2016-08-10 17:54:02 +02:00
parent 7b4be74688
commit dec9f7a621
3 changed files with 21 additions and 2 deletions

View File

@ -4,7 +4,10 @@ class command():
def __init__(self):
pass
def run(self, environment):
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newContentText'],interrupt=True)
if environment['screenData']['newContentText'].strip(" \t\n") == '':
environment['runtime']['outputManager'].presentText(environment, "blank", interrupt=True)
else:
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newContentText'],interrupt=True)
return environment
def setCallback(self, callback):
pass

View File

@ -0,0 +1,15 @@
#!/bin/python
class command():
def __init__(self):
pass
def run(self, environment):
if environment['screenData']['newDelta'].strip(" \t\n") == '':
environment['runtime']['outputManager'].presentText(environment, "blank", interrupt=True)
else:
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newDelta'], interrupt=True)
return environment
def setCallback(self, callback):
pass
def shutdown(self):
pass