-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInternetSpeedTest.py
More file actions
36 lines (26 loc) · 1.13 KB
/
InternetSpeedTest.py
File metadata and controls
36 lines (26 loc) · 1.13 KB
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
from tkinter import *
import speedtest
def speedcheck():
sp = speedtest.Speedtest()
sp.get_servers()
down = str( round(sp.download()/(10**6),3))+ " Mbps"
up = str( round(sp.upload()/(10**6),3))+ " Mbps"
lab_down.config(text=down)
lab_up.config(text=up)
sp = Tk()
sp.title(" Internet Speed Test ")
sp.geometry("500x500")
sp.config(bg="Blue")
lab = Label(sp, text="Internet Speed Test", font=("Time New Roman",30,"bold"),bg="Blue",fg="Yellow")
lab.place(x=60, y=40,height=50, width=380)
lab = Label(sp, text="Download Speed", font=("Time New Roman",30,"bold"))
lab.place(x=60, y=130,height=50, width=380)
lab_down = Label(sp, text="00", font=("Time New Roman",30,"bold"))
lab_down.place(x=60, y=200,height=50, width=380)
lab = Label(sp, text="Upload Speed", font=("Time New Roman",30,"bold"))
lab.place(x=60, y=290,height=50, width=380)
lab_up = Label(sp, text="00", font=("Time New Roman",30,"bold"))
lab_up.place(x=60, y=360,height=50, width=380)
button = Button(sp, text="Check Speed",font=("Time New Roman",30,"bold"),relief=RAISED,bg="Red",command=speedcheck)
button.place(x=60, y=460,height=50, width=380)
sp.mainloop()