Aquesta és una revisió antiga del document —-

1.5 A simple GUI application

Now we're going to build a very simple and rather useless GUI application. Does that sound weird? Maybe, but the application, when ready, will make you more accustomed to some tkinter habits and conventions.

Our fabulous goal will look like the vision presented below:

Are you ready? Let's start.

As everyone knows, Rome wasn't built in a day, and our application isn't an exception. We'll start with something absolutely obvious – we'll construct a window and launch an event controller – look at the code in the editor to see how to do it.

import tkinter as tk
 
window = tk.Tk()
window.mainloop()

Our window looks like this one for now:

  • info/cursos/pue/python-pcpp1/m3/1.5.1703358459.txt.gz
  • Darrera modificació: 06/07/2026 18:29
  • (edició externa)