Fixed description and code for this amazing project
[speedtestpy/.git] / spdtest.py
index e77b6dd694541265e5b2a882134c1fb57e6cc8a4..079f5d29b3c6ba90784343c2a8f764cacc03f663 100644 (file)
@@ -1,8 +1,13 @@
 import speedtest
+import pprint
+pp = pprint.PrettyPrinter(indent=4)
 #first we need impot speedtest check it how you can do it in your OS
-
+servers = []
 st = speedtest.Speedtest()
-
+st.get_servers(servers)
+bestservers = st.get_best_server()
+print("The best server found for this test is")
+pp.pprint(bestservers)
 def testing(option,option1,option2):
 
        if option == 1 and option1 == 2 and option2 == 3:
@@ -19,7 +24,7 @@ def testing(option,option1,option2):
        else:
                print("Please enter the correct choice!")
 
-print("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-")
+print("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-")
 print("Test in process please wait...")
 testing(1,2,3)
-print("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-")
\ No newline at end of file
+print("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-")