Python's Tkinter module can be used to create a Graphics User Interface (GUI). This sample code creates a windows type form and positions a label and a canvas on the form. A simple shape is drawn on the canvas.
# using grid() to position a label and a canvas
# tested with Python24 vegaseat 09jun2005
from Tkinter import *
def __init__(self, root):
self.root = root
# create the label
label1 = Label(root,
text="canvas1.create_rectangle(15, 10, 400, 150, outline='red', fill='gray80')")
# position the label on the form and show it
# create the canvas
canvas1 = Canvas(root, width=420, height=200)
# position the canvas on the form and show it
# now create the recangle on the canvas
canvas1.create_rectangle(15, 10, 400, 150, outline='red', fill='gray80')
# position a text at x=100, y=90 so it shows in the rectangle center
font1 = ('times', 20, 'bold')
canvas1.create_text(100, 90, anchor=SW, text="Hello World!",
# create the window's form/root
root = Tk()
# window title text
# be different, default would be light gray
# call the class
app = App(root)
# run program
You're trying to visit a URL that doesn't currently exist on the web.
Most likely, a member posted a link a long time ago to a web page that has since been removed.
It's also possible that there was a typo when posting the URL.
We redirect you to this notice instead of stripping out the link to preserve the integrity of the post.