def menu_input(): menu_table() sbody_input = input('Choose a number from menu: ') if int(sbody_input) == 1: todo.add_todo() elif int(sbody_input) == 2: todo.completed_todo() elif int(sbody_input) == 3: todo.delete_database() elif int(sbody_input) == 4: todo.list_todo() elif int(sbody_input) == 5: todo.list_todo_only_ch() elif int(sbody_input) == 6: todo.list_todo_ch() elif int(sbody_input) == 7: todo.list_todo_all() elif int(sbody_input) == 8: todo.remove_todo() elif int(sbody_input) == 9: todo.remove_todo_ultimate() elif int(sbody_input) == 10: todo.search_todo() elif int(sbody_input) == 11: todo.uncompleted_todo() elif int(sbody_input) == 12: exit() else: print('This is not correct number!') other_input = input('Choose a number from menu: ')
def menu_input(): sbody_input = input('Choose from menu: ') try: menu_choose = False while menu_choose == False: if int(sbody_input) == 1: todo.list_todo() menu_choose = True elif int(sbody_input) == 2: todo.add_todo() menu_choose = True elif int(sbody_input) == 3: todo.completed_todo() menu_choose = True elif int(sbody_input) == 4: todo.uncompleted_todo() menu_choose = True elif int(sbody_input) == 5: todo.remove_todo() menu_choose = True elif int(sbody_input) == 6: todo.list_removed_todo() menu_choose = True elif int(sbody_input) == 7: exit() else: print('This is not correct number!') other_input = input('Choose other number: ') if menu_right == True: main() except ValueError: print('Please only enter numbers! ') menu_input()
from sys import * import os import todo def readme(): os.system('cls') open_file = open('README.md') open_text = open_file.read() open_file.close() print(open_text) if len(argv) != 1 and len(argv) < 4: if (argv[1] == 'add'): if len(argv) == 3: todo.add_todo(argv[2]) else: todo.add_todo() elif (argv[1] == 'ls' or argv[1] == 'st'): if len(argv) == 3 and argv[2] == '-la': todo.list_removed_todo() else: todo.list_todo() elif (argv[1] == 'rm'): todo.remove_todo() elif (argv[1] == 'ch'): todo.completed_todo() elif (argv[1] == 'uch'): todo.uncompleted_todo() elif (argv[1] == '--help'): readme() elif (argv[1]) == '--version':
def process_add_todo(name, text): time.sleep(3) add_todo(name, text)
def add_to_todo(): title_content = title.get() description = desc_entry.get(0.0, tk.END) todo.add_todo(title_content, description) display_todo()
def add_todo(self, n): lines = self._test_lines_no_pri(n) for line in lines: todo.add_todo(line)