Attachment 'lecture7_homework.py'
Download
Toggle line numbers
1 #!/usr/bin/python
2
3 from Tkinter import *
4
5 def Insert():
6 name = text.get()
7 name2 = text2.get()
8
9 list.insert(END, name)
10 list.insert(END, name2)
11 text2.delete(0,END)
12 text.delete(0,END)
13
14 root = Tk()
15 root.geometry('200x210+350+70')
16
17 text = Entry(root, bg = 'white')
18 text2 = Entry(root, bg = 'white')
19
20 button = Button(root, text = "press me", command = Insert)
21
22 list = Listbox(root, bg = 'blue', fg = 'yellow')
23
24
25 text.pack()
26 text2.pack()
27
28 button.pack(padx = 4, pady = 4, anchor= E)
29
30 list.pack()
31
32
33 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.