def interface(object_file_names, settings, sections, board, demo_id): while True: cmd = input("\n[t][s][q][enter]=> ") if cmd == "t": tickets = Section.tickets_keys_on_board(sections) print(f"Tickets: {tickets}") if len(tickets) > 0: cmd = input("Choose a ticket=> ") while cmd not in tickets: cmd = input("Not a valid number. Choose again=> ") print(Section.get_ticket(cmd, sections)) elif cmd == "s": print(f"Sections: {sections.keys()}") if len(sections.keys()) > 0: cmd = input("Choose a section=> ") while cmd not in sections.keys(): cmd = input("Not a valid number. Choose again=> ") print(sections[cmd]) elif cmd == "q": board.ticket_collection = None board.section_collection = None save_pickle_files(object_file_names, settings, sections, board) logging.warning("Exiting program!") sys.exit() else: return cmd = ""