Opening a second python file (tkinter) Opening a second python file (tkinter) tkinter tkinter

Opening a second python file (tkinter)


One approach is to create a function that will handle the operations you need done, then bind the command of your button to it.

def close_current_and_open_other():    # code to close the current: destroy(), etc...    # code to open the second programbtnLearn = Button(container2, image=imgLearnBtn, command=close_current_and_open_other).pack(side=BOTTOM, padx=100)