[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
Due to the reasons discussed here we will be moving to python-forum.io/ on October 1 2016
This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
Posts: 1672
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: Bing [Bot] and 2 guests