I am beginner in python. I am trying to make a python wiki app that gives you a summary of anything that you search for.
My code is below:
import wikipediaquestion = input("Question: ")wikipedia.set_lang("en" )print (wikipedia.summary(question) )
This code works but I want to add a tkinter
GUI to the app with an entry field and a search button. The result of the search will then be displayed in the GUI in a text box.
assuming you really did research and came out empty(which is highly unlikely),you could use something like
from tkinter import *
import wikipediadef on_click():q = get_q.get()text.insert(INSERT, wikipedia.summary(q))root = Tk()
question = Label(root, text="Question")
question.pack()
get_q = Entry(root, bd =5)
get_q.pack()
submit = Button(root,text='Submit',command=on_click)
submit.pack()
text = Text(root)
text.pack()root.mainloop()
Do try to research more and readthedocs,they are your best friend in programming