-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwikipy.PY
62 lines (36 loc) · 1.19 KB
/
wikipy.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
61
62
import wikipedia
from email.mime import image
from multiprocessing.sharedctypes import Value
from tkinter import*
import random
import tkinter.font as tkFont
import tkinter as tk
from tkinter import ttk
def action():
theme=recherche.get()
wikisearch=wikipedia.page(theme,auto_suggest=False)
result_research.delete('1.0', END)
result_research.insert(END, wikisearch.summary)
def ressetButton():
recherche.delete(0,END)
result_research.delete(0,END)
wiki = Tk()
wiki.geometry("1920x1080")
Valider=Button(wiki,text="Lancer la recherche",command=action)
Valider.pack
Valider.place(x=10,y=900)
resetButton = Button(wiki,text="Réinitialiser",command=ressetButton)
resetButton.pack()
resetButton.place(x=960,y=900)
quitter= Button(wiki,text="Quitter l'application",command=wiki.destroy)
quitter.pack()
quitter.place(x=1790,y=900)
name_research=Label(wiki,text="Entrez votre recherche : ")
name_research.pack()
name_research.place(x=670,y=100)
recherche=Entry(wiki)
recherche.pack()
recherche.place(x=800,y=100)
result_research = Text(wiki, width=100, height=20)
result_research.place(x=500,y=250)
wiki.mainloop()