Skip to content

Instantly share code, notes, and snippets.

@siwells
Created October 10, 2011 15:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save siwells/1275637 to your computer and use it in GitHub Desktop.
Save siwells/1275637 to your computer and use it in GitHub Desktop.
A Python GUI "Hello World" using Tkinter
from Tkinter import *
root = Tk()
w = Label(root, text="Hello World")
w.pack()
root.mainloop()
@sarkiroka
Copy link

sarkiroka commented Dec 15, 2019

sudo apt-get install python3-tk Installs tkinter for Python3.x.x

hello-world.py:

from tkinter import *
root = Tk()
myLabel = Label(root, text = 'Hello, sarkiroka!')
myLabel.pack()
root.mainloop()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment