import tkinter
window = tkinter.Tk()
window.configure(background="grey90")
window.title("Downloader")
window.geometry("300x300")
window.resizable(False, False)
entry = tkinter.Entry(window)
entry.place(x=70,y=68)
entry.configure(highlightbackground="grey90")
button = tkinter.Button(window, text="Download",
command=window.destroy, highlightbackground="grey90")
button.place(x=110,y=120)
to_download = entry.get()
window.mainloop()
print(to_download)
Hello, I need some help in storing the output after the "download" button is clicked,what I want is when "download" button is clicked the value to be stored to_download
(if an input is placed not None
) and the window to close.
Right now the window is closing but it doesn't store the value