#-- Importing Modules ... from logging import exception import Library_Module as lib import Student_Module as std import os import time # >> -------------------------------------------------- Function Section --------------------------------------------------- << # // Function for creating some important files for the program (1. Stationaries.txt & 2. Students.txt) def makeMainFile(): try: f1 = open("Stationaries.txt", "x") f1.close() try: f2 = open("Students.txt", "x") f2.close() except: pass except: pass # >> ------------------------------------------------------------------------------------------------------------------------ << # ********************************************************************************************* clear = lambda: os.system('cls' if os.name in ('nt', 'dos') else 'clear') # cls function clear() makeMainFile() # .. calling Function from above Function Section # *********************************************************************************************** # -- LOOP for asking for the input while True: print(""" *****************Welcome*****************\n 1.Library Mode\n 2.Student Mode\n """) # try: user_input_for_mode=int(input("Enter Your Choice [1, 2]: ")) if user_input_for_mode == 1: lib.libraryHeader() break elif user_input_for_mode == 2: std.studentHeader() break else: print("\nInvalid Input !") # except: # print("\nInvalid Input !") time.sleep(2) clear()