Exemple #1
0
                 each = -1
     
     gv.openTasks.append(gf.addTask(hrName, Class, dueDate, assignDate, priority, description, longTerm))
 if choice == 4:
     pass
 if choice == 5:
     if gf.storeTasks(gv.taskFile, gv.openTasks):
         print "Save Successful"
     else:
         print "Hmm, something went wrong... Yuck! I hope you weren't using this on a production system!"        
 if choice == 6:
     while 1:
         choice_goahead = raw_input("Are you sure you want to do this? It overwrites non-saved tasks! (y/n):  ")
         if choice_goahead == "y":
             print "\n Okay! Reloading....\n"
             gv.openTasks = gf.loadTasks(gv.taskFile)
             break
         elif choice_goahead == "n":
             print "\nGot it! I won't reload\n"
             break
         else:
             print gf.noComprendo(choice_goahead)
 if choice == 0:
     while 1:
         choice_save = raw_input("Exiting... Do you wish to save? (y/n):  ")
         if choice_save == "y":
             if gf.storeTasks(gv.taskFile, gv.openTasks):
                 print "Save Successful"
             else:
                 print "Hmm, something went wrong... Yuck! I hope you weren't using this on a production system!"
             break
Exemple #2
0
def organize_for_tree(treestore):
    hrClassList = conf.configInit.grab_class_config() #hrClasslist
    openTasks = gf.loadTasks(os.path.expanduser(conf.configInit.grab_file_locations()[0]))
    return (hrClassList, openTasks)