-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgui
36 lines (28 loc) · 926 Bytes
/
gui
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from Functions import *
from tkinter import *
# Tkinter Window
tkWindow = Tk();
tkWindow.geometry("500x500")
# Tkinter Text Box
textBox =Text(tkWindow,height=15,width=60);
Listbox = Listbox (tkWindow)
Listbox.pack()
textBox.pack(expand= 1, fill= BOTH)
Button1 = Button(tkWindow, text='Unwrap')
Button1.pack()
Soup = SoupFILEimport('/Users/williamcorney/PycharmProjects/pythonProject/source/Yy4wOjI6NS53amVv.html')
Tags = SoupALLtags(Soup)
for item in Tags: Listbox.insert('end', item)
def callback(event):
selection = event.widget.curselection()
if selection:
index = selection[0]
data = event.widget.get(index)
soup = SoupSPECIFICtag(data)
textBox.delete("1.0", "end")
for items in soup:
textBox.insert(INSERT, str(items))
#label.configure(text=SoupSPECIFICtag(data))
print (data)
Listbox.bind("<<ListboxSelect>>", callback)
tkWindow.mainloop()