MCPcopy Index your code
hub / github.com/geekcomputers/Python / __init__

Method __init__

wiki/wiki.py:22–74  ·  view source on GitHub ↗
(self, root)

Source from the content-addressed store, hash-verified

20
21class main:
22 def __init__(self, root):
23 self.root = root
24
25 self.root.title("WIKIPEDIA SEARCH")
26 self.root.geometry("1920x1080")
27
28 self.lbl1 = Label(
29 root,
30 text="WIKIPEDIA SUMMARY",
31 font=("Verdana", 25, "bold"),
32 width=50,
33 bg="yellow",
34 fg="red",
35 relief=SOLID,
36 )
37 self.lbl1.pack(padx=10, pady=15)
38
39 self.question = StringVar()
40
41 self.quesbox = Entry(
42 root,
43 text="TELL ME YOUR QUESTION",
44 font=("Verdana", 20, "italic"),
45 width=80,
46 textvariable=self.question,
47 relief=GROOVE,
48 bd=10,
49 )
50 self.quesbox.pack()
51
52 self.searchbtn = Button(
53 root,
54 text="SEARCH",
55 font=("Callibri", 18, "bold"),
56 width=30,
57 relief=GROOVE,
58 bg="#4cd137",
59 bd=3,
60 command=lambda: self.summary("None"),
61 )
62 self.searchbtn.pack()
63
64 self.answer = Text(
65 root,
66 height=100,
67 width=160,
68 font=("Arial", 14),
69 wrap=WORD,
70 bg="#7CEBC6",
71 fg="black",
72 )
73
74 self.root.bind("<Return>", self.summary)
75
76 def summary(self, event):
77 self.searchbtn["text"] = "Searching..."

Callers

nothing calls this directly

Calls 1

summaryMethod · 0.95

Tested by

no test coverage detected