Created
October 10, 2011 15:38
-
-
Save siwells/1275637 to your computer and use it in GitHub Desktop.
A Python GUI "Hello World" using Tkinter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Tkinter import * | |
root = Tk() | |
w = Label(root, text="Hello World") | |
w.pack() | |
root.mainloop() |
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
That module name has changed from
Tkinter
in Python 2 totkinter
in Python 3