loop to handle commands & possibly re-show window
This commit is contained in:
parent
684834806e
commit
e6d8d36aeb
9
dwtt
9
dwtt
@ -37,13 +37,20 @@ def main(argv):
|
||||
|
||||
ds = DataStore(timedbfile)
|
||||
|
||||
while True:
|
||||
cmdline = doCmdWindow()
|
||||
cmd = Command(cmdline)
|
||||
print "Command:", cmd
|
||||
if not processCommand(cmd, ds):
|
||||
break
|
||||
|
||||
def doCmdWindow():
|
||||
c = CmdWindow()
|
||||
return c.main()
|
||||
|
||||
# Returns boolean for whether the command prompt should be displayed again
|
||||
def processCommand(cmd, store):
|
||||
print cmd
|
||||
return cmd.command == 'status'
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(sys.argv)
|
||||
|
Loading…
x
Reference in New Issue
Block a user