I've got a Frame Object that creates all the GUI for my program, and I'm trying to call it in my main function and send it some arguments to use. However, I cant figure out where I need to add them into the object so that it will except them properly, I keep getting an error that says Im giving it more arguments than it can take.
This is the Frame object's constructor method:
class Application(Frame): def __init__(self, master): Frame.__init__(self, master) self.pack(expand = 1, fill = BOTH) #Creates the canvas to draw everything on self.window = Canvas(self, bg = "#00CD00", width = 1000, height = 625) #Imports all the card images into a 2d list self.import_cards() #Draws the window self.create_window()
and the section from my main code:
def __draw_window(player1, player2): root = Tk() root.title("WAR") dimensions = str(root.winfo_screenwidth()-100) + "x" + str(root.winfo_screenheight()-300) root.geometry(dimensions) root.resizable(0,0) app = Application(root, player1, player2) app.mainloop()