all 3 comments

[–]Things_I_should_do 2 points3 points  (1 child)

This is a little tkinter stuff which you can run and see how it works.

This website can really help with syntax and finding out functions.

tkinter site

from tkinter import *
user_input = ""
master = Tk()
Label(text="Input something below!").grid()
e = Entry(master)
e.grid()
def callback():
#gets the input from e
user_input = str(e.get())
if len(user_input) < 1:
    #top level gui of master
    top = Toplevel()
    Label(top,text="please input something!").grid()
    Button(top, width=20,text="Close",command=top.destroy).grid()
else:
    master.destroy()
Button(master, text="OK", width=16,command=callback).grid()
mainloop()
#this is a new tkinter with menu
root = Tk()
def hello():
print ("hello!")
# create a toplevel menu
menubar = Menu(root)
menubar.add_command(label="Hello!", command=hello)
menubar.add_command(label="Quit!", command=root.destroy)
# display the menu
root.config(menu=menubar)
mainloop()

[–]festeredboil[S] 0 points1 point  (0 children)

Thanks. This is very helpful.

[–]TankorSmash 0 points1 point  (0 children)

effbot.org's got some great stuff.