forked from kinkintama/Deneyap-Kart-Web-Agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DownloadGUI.py
39 lines (32 loc) · 887 Bytes
/
DownloadGUI.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
from tkinter import Tk, Label
import time
base = "Deneyap Elektronik Geliştirme Kart'ları kütüphaneleri indiriliyor. Lütfen bekleyiniz."
lbl = ""
window = ""
def startGUI() -> None:
"""
Starts tkinter gui to indicate core and library download
"""
global lbl
global window
window = Tk()
window.iconbitmap('icon.ico')
window.title("Deneyap Kart Web")
window.geometry("700x80")
lbl = Label(window, text=base, font=("Arial", 15))
lbl.pack(pady = 20, padx=10, anchor="w")
window.after(1, animateText)
window.mainloop()
def animateText() -> None:
"""
to make sure user understants it is not hanging, dots keeps moving.
"""
i = 0
while True:
i+=1
text = base + "." *(i%4)
lbl.config(text = text)
window.update()
time.sleep(0.5)
if __name__ == '__main__':
startGUI()