I am making a python script:
import tkinter
def print_the_nothing_thing():
print("I told you, nothing means nothing. For further assistance, please see:")
print("https://www.youtube.com/watch?v=3WNlWyFgLCg")
print("Type the url into the browser.")
#setup the window
window = tkinter.Tk()
menu = tkinter.Menu(window)
window.configure(menu=menu)
view = tkinter.Menu(menu)
file = tkinter.Menu(menu)
menu.add_cascade(label="File", menu=file)
menu.add_cascade(label="View", menu=view)
#here is my problem
view.add_command(label="Nothing here!", command=print_the_nothing_thing())
file.add_command(label="Nothing here!", command=print_the_nothing_thing())
helpm.add_command(label="Help", command=helpy())
window.mainloop()
My problem is that when I define the function, it runs the function first. After closing it, the menu command does nothing.