Skip to content

Instantly share code, notes, and snippets.

@Korilakkuma
Last active September 30, 2015 04:34
Show Gist options
  • Select an option

  • Save Korilakkuma/fb788b244502cd5cda8c to your computer and use it in GitHub Desktop.

Select an option

Save Korilakkuma/fb788b244502cd5cda8c to your computer and use it in GitHub Desktop.
GUI event by Tkinter
import tkinter as tk
root = tk.Tk()
root.geometry('800x600')
button = tk.Button(text = "Submit", command = root.quit)
button.pack()
root.mainloop()
entry = tk.Entry()
entry.bind('<Return>', lambda e: print(entry.get()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment