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