How do I disable my login button in python How do I disable my login button in python tkinter tkinter

How do I disable my login button in python


Try this:

Login = partial(login, username, password)loginButton = Button(tkWindow, text="Login", command=Login)loginButton.grid(row=4, column=0)if os.path.getsize('accounts.txt') == 0:    loginButton['state'] = DISABLEDelse:    loginButton['state'] = NORMAL    pass