I'm working on a database GUI in tkinter but whenever I try to nest some functions inside one another it always makes unpredictable problems, So I'd like to ask if it's possible to make a button run a function that checks for a condition and if it's true it runs another script.py file that opens another window. Is that possible
I've already tried to press them into one file but weird problems appear and the file is too big to post here so I'm looking for a simpler solution
I'm a beginner so I'm not a hundred percent certain but I think it would look something like this
from tkinter import *
if name.get() == user_name AND pword.get() == password:
r = Tk()
my_btn = Button(r, text= "submit",command = open_py)
my_btn.grid(row=0,column=0)
r.mainloop()
Is this kind of thing possible or not. How would "open_py():" look like