creado gitignore
[speedtestpy/.git] / spdtest.py
1 import speedtest
2 st = speedtest.Speedtest()
3
4 def opciones(option,optione,optiones):
5
6         if option == 1 and optione == 2 and optiones == 3:
7                 #print(st.download(), 'b/s')
8                 mb=(st.download()*1.0E-6)
9                 print("Velocidad de bajada:","{0:.2f}".format(mb),"mb")
10                 #print(st.upload(), 'b/s')
11                 mb2=(st.upload()*1.0E-6)
12                 print("Velocidad de subida:","{0:.2f}".format(mb2),"mb")
13                 servernames =[]
14                 st.get_servers(servernames)
15                 print("Ping:",st.results.ping,'ms')
16         else:
17                 print("Please enter the correct choice!")
18
19 print("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-")
20 print("Haciendo prueba de velocidad en Python")
21 opciones(1,2,3)
22 print("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-")