def validate(self, page_name, c_code, id, pwd):
     global class_codes
     if id == manager_id and pwd == manager_pass and c_code in class_codes:
         frame = self.frames[page_name]
         global current_class
         current_class = c_code
         print("current class", current_class)
         if current_class != 'Marauders':
             # frame.lb_class_code.config(text="Batch Code : {}".format(current_class))
             # frame.lb_class_code['text']="Batch Code : {}".format(current_class)
             StudentsList(current_class).make_pkl_file()
             if page_name == "ManagerPanelPage":
                 global FaceTrainObj
                 FaceTrainObj = FaceTrain(current_class)
             elif page_name == "StudentPanelPage":
                 global current_class_obj
                 current_class_obj = MainFile(current_class)
         elif current_class == 'Marauders' and page_name == 'StudentPanelPage':
             messagebox.showerror('Error', 'Only Manager Panel is valid for this class-code')
             return
         else:
             frame = self.frames['CreateNewBatchPage']
         frame.tkraise()
     else:
         messagebox.showerror('Error', 'Incorrect Credentials !!')
from openpyxl import Workbook, load_workbook
import excel
from capture import capture
from capture import detect_faces
from face_train import FaceTrain
from students_list import StudentsList
from main_file import MainFile

class_codes = ['Marauders']
manager_id = 'ADMIN'
manager_pass = '******'

current_class = 'Marauders'
if current_class != 'Marauders':
    current_class_obj = MainFile(current_class)
    FaceTrainObj = FaceTrain(current_class)
else:
    current_class_obj = None
    FaceTrainObj = None

# Dynamic variables
normal_width = 1920
normal_height = 1080
x, y = pyautogui.size()

percentage_width = x/(normal_width/100)
percentage_height = y/(normal_height/100)
scale_factor = ((percentage_width + percentage_height)/2)/100

title_fontsize = int(30 * scale_factor)
minimum_size = 24