Attachment 'lecture4_first.py'
Download
Toggle line numbers
1 #!/usr/bin/python
2
3 from Tkinter import *
4
5
6 def Callme():
7 print 'hi'
8 print 'doggy dog'
9
10 def SecondFunction():
11 label = Label(root, text = 'jimmy poo', fg = 'blue')
12 label.pack()
13
14
15
16 root = Tk()
17
18 bobby = Button(root, text = 'Press', command = Callme , fg = 'white', bg = 'black')
19 bobby.pack()
20
21 jimmy = Button(root, command = SecondFunction, text = 'I am jimmy')
22 jimmy.pack()
23
24
25 root.mainloop()
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.