|
tkinter
See Also Tk Docs IntroductionThe project standard GUI is Tkinter and ttk, as both are included in the standard Python distribution. Other GUIs may be implemented, but links to the download page for the GUI must be included in the module.py file. Tkinter is the base GUI module, ttk is an extension of Tkinter that allows for more modern-looking cross-platform widgets. Recommended Usageroot # Toplevel Window font # Custom font label # Text label button # Buton entry # Text Field import tkinter as tk
import tkinter.ttk as ttk
root = tk.Tk()
root.title('Game Name')
font = 'Arial 16 italic'
label = ttk.Label(root, text='Hello World', font=font)
label.grid(row=0, column=0)
button = ttk.Buton(root, text='Push Me', command=exit)
button.grid(row=1, column=0)
entry = ttk.Entry(root)
entry.grid(row=2, column=0)
root.mainloop() # Actually display root to user.For advanced usage see Tk Docs |