diff --git a/Command.py b/Command.py new file mode 100644 index 0000000..1f2f29a --- /dev/null +++ b/Command.py @@ -0,0 +1,9 @@ + +class Command: + def __init__(self, timenow, cmdline): + self.time = timenow + self.command = 'start' + self.parseCommandLine(cmdline) + + def parseCommandLine(self, cmdline): + parts = cmdline.split(None, 1) diff --git a/dwtt b/dwtt index 0ae9867..ad4a252 100755 --- a/dwtt +++ b/dwtt @@ -1,6 +1,7 @@ #!/usr/bin/env python from CmdWindow import CmdWindow +from Command import Command import sqlite3 import os import sys @@ -27,8 +28,9 @@ def main(argv): for opt, arg in opts: if opt == '-c': - cmd = doCmdWindow() - print "cmd was:", cmd + cmdline = doCmdWindow() + print "cmd was:", cmdline + cmd = Command(timenow, cmdline) elif opt == "--help": usage() sys.exit()