X-Git-Url: https://git.josue.xyz/?p=speedtestpy%2F.git;a=blobdiff_plain;f=spdtest.py;h=e77b6dd694541265e5b2a882134c1fb57e6cc8a4;hp=76bfca989134533408817340d7956ed9024d1fbd;hb=e6d40bd10575970d0b907d21384b8c797b6b6a7c;hpb=2da091bed3d3fe0f448067410819945f7a9c329d diff --git a/spdtest.py b/spdtest.py index 76bfca9..e77b6dd 100644 --- a/spdtest.py +++ b/spdtest.py @@ -1,22 +1,25 @@ import speedtest +#first we need impot speedtest check it how you can do it in your OS + st = speedtest.Speedtest() -def opciones(option,optione,optiones): +def testing(option,option1,option2): - if option == 1 and optione == 2 and optiones == 3: - #print(st.download(), 'b/s') + if option == 1 and option1 == 2 and option2 == 3: mb=(st.download()*1.0E-6) - print("Velocidad de bajada:","{0:.2f}".format(mb),"mb") - #print(st.upload(), 'b/s') + print("Download speed:","{0:.2f}".format(mb),"mb") + mb2=(st.upload()*1.0E-6) - print("Velocidad de subida:","{0:.2f}".format(mb2),"mb") + print("Upload speed:","{0:.2f}".format(mb2),"mb") + servernames =[] st.get_servers(servernames) print("Ping:",st.results.ping,'ms') + else: print("Please enter the correct choice!") print("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-") -print("Haciendo prueba de velocidad en Python") -opciones(1,2,3) +print("Test in process please wait...") +testing(1,2,3) print("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-") \ No newline at end of file