[Tkinter Example] Hello World very basic

Post here if you need help with creating a Graphical User Interface in Python.

[Tkinter Example] Hello World very basic

Postby Yoriz » Sat Feb 09, 2013 2:12 pm

Code: Select all
import Tkinter

root = Tkinter.Tk()
root.title('Hello World')
app = Tkinter.Frame(master=root)

Last edited by Yoriz on Tue Mar 19, 2013 1:03 pm, edited 1 time in total.
Reason: Added Example to the title
New Users, Read This
Join the #python-forum IRC channel on irc.freenode.net!
User avatar
Posts: 1586
Joined: Fri Feb 08, 2013 1:35 am
Location: UK

Re: Hello World very basic example

Postby wuf » Sat Feb 09, 2013 5:24 pm

Here an other basic example:
Code: Select all
    #~~ For Python 2.x
    import Tkinter as tk
except ImportError:
    #~~ For Python 3.x
    import tkinter as tk

app_win = tk.Tk()
app_win.title('Hello World')
app_frame = tk.Frame(app_win)

wuf ;)
Posts: 57
Joined: Fri Feb 08, 2013 6:42 am

Return to GUI

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests