-
Notifications
You must be signed in to change notification settings - Fork 0
/
GUI_support.py
60 lines (49 loc) · 1.2 KB
/
GUI_support.py
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Support module generated by PAGE version 4.19
# in conjunction with Tcl version 8.6
# Dec 11, 2018 02:22:20 AM +03 platform: Windows NT
import sys
import search
try:
import Tkinter as tk
except ImportError:
import tkinter as tk
try:
import ttk
py3 = False
except ImportError:
import tkinter.ttk as ttk
py3 = True
def set_Tk_var():
global textVar
textVar = tk.StringVar()
textVar.set('')
global entryInput
entryInput = tk.StringVar()
def isClicked():
print('Clicked Search')
a=entryInput.get()
print(a)
docs=[]
docs=search.do_search(a)
# finalString=""
# for x in range(len(docs)):
# finalString = finalString + "\n " + docs[x].__str__()+ '\n'
if(len(docs)!= 0 ):
print(docs)
textVar.set(docs)
else:
textVar.set("Bulunamadi!")
sys.stdout.flush()
def init(top, gui, *args, **kwargs):
global w, top_level, root
w = gui
top_level = top
root = top
def destroy_window():
# Function which closes the window.
global top_level
top_level.destroy()
top_level = None