예제 #1
0
def mark_task_as_done(task_id):
    """Marks task as done"""
    list_name = folder + default_listname + list_extension
    todo_list = TodoList(list_name)
    removed_text = todo_list.remove(task_id)
    todo_list.save()

    print "Removed '%s' from %s" % (removed_text, default_listname + list_extension)
예제 #2
0
def add_task(task):
    """Adds an item to the default list"""
    list_name = folder + default_listname + list_extension
    
    todo_list = TodoList(list_name)
    todo_list.add(task)
    todo_list.save()
   
    print "Added to '%s' to %s" % (task, default_listname + list_extension)