code: def run(command, options, args):
      
  
      if command == "backend":
          subprocess.call(("sqlite3", db_path))
  
      if command == "add":
          dp = pdt.Calendar()
          due = mktime(dp.parse(options.due)[0]) if options.due else None
          print "added tasks..."
          [Task(desc, due).add() for desc in args]
          return
  
      filters = args if len(args) else None
      rows    = Query(filters, options).find()
      tasks   = [Task(r["desc"], r["due"]) for r in rows]
  
      if command == "list":
          for t in tasks:
              print "\t *", t
  
      if command == "done":
          print "done with..."
          finished_tasks = []
          for t in tasks: 
              finished = t.done()
              if finished:
                  finished_tasks.append(t)
  
          if not finished_tasks:
              return
  
          print ""
          print "finished tasks:"
          for t in finished_tasks:
              print "\t X", t
      
      if command == "remove":
          print "remove..."
          removed_tasks = []
          for t in tasks: 
              removed = t.remove()
              if removed:
                  removed_tasks.append(t)
      
          if not removed_tasks:
              return
      
          print ""
          print "removed tasks:"
          for t in removed_tasks:
              print "\t RM", t
docs: Run the requested command. args is either a list of descriptions or a list of strings to filter by