My tkinker Python script is not working, it says the error ""tuple" object has no attribute "read"", how could I fix this?
My code is here: https://pastebin.com/kLnmutcg
My theory why it says this error is in this code:
def save():
filename = filedialog.askopenfilename(filetypes=(("txt files","*.txt"),("All files","*.*")))
file = open=(filename, "wt")
def open():
filename = filedialog.askopenfilename(filetypes=(("txt files","*.txt"),("All files","*.*")))
file = open=(filename, "rt")
read = file.read()
text_box.insert(tk.END, read)
I'm trying to make a notepad clone of sorts.