Commit 91640d98 by Chris Johnson

help me please

parents c7e0686f 9aa509c1
......@@ -17,7 +17,6 @@ def callback_function2():
sg.popup('In Callback Function 2')
print('In the callback function 2')
Filters = None
layout = [[sg.Text('Wikihow Tool')],
[sg.Text('Search Here'), sg.Input(key = 'Query'), sg.Button('Search')],
......@@ -30,25 +29,29 @@ layout = [[sg.Text('Wikihow Tool')],
[sg.Spin([i for i in range(100)], initial_value=0, key = "num_sources"), sg.Text('Number of sources cited')],
[sg.Spin([i for i in range(100)], initial_value=0, key = "num_views"), sg.Text('Views')],
[sg.Combo(['English', 'Español', 'Português', 'Italiano', 'Français', 'русский язык', 'Deutsch', '简体中文', 'Nederlands', 'Čeština', 'Bahasa Indonesia', '日本語', 'हिंदी', 'ภาษาไทย',' العَرَبِيةُ', 'Tiếng Việt', '한국말', 'Türkçe',' فارسی']), sg.Text('Language of the Article')],
[sg.StatusBar( text=f'| Filters On: {Filters}', size=(30,1), pad=(0,0), text_color='black', background_color='white', relief=sg.RELIEF_FLAT, justification='left', visible=True, key='status_bar' )]]
[sg.StatusBar( text=f'| Filters On: {None}', size=(30,1), pad=(0,0), text_color='black', background_color='white', relief=sg.RELIEF_FLAT, justification='left', visible=True, key='status_bar' )]]
window = sg.Window('WikiHow Search and Filters', layout)
while True:
event, values = window.read()
print(event, values)
if event == sg.WIN_CLOSED:
break
elif event == 'Search':
filters = values
#filters["num"]
wh_query = values['Query']
print(filters, wh_query)
window.close()
def interact(filters = {}):
window = sg.Window('WikiHow Search and Filters', layout)
while True:
event, values = window.read()
if event == sg.WIN_CLOSED:
break
elif event == 'Search':
filters = values
wh_query = values['Query']
print(event, values)
display_results(filters)
window.close()
def display_results(filters):
query = filters['Query']
results = SearchResults.SearchResults(query, filters)
print(results)
#code to add window here
'''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment