X-Git-Url: https://git.josue.xyz/?p=speedtestpy%2F.git;a=blobdiff_plain;f=spdtest.py;h=079f5d29b3c6ba90784343c2a8f764cacc03f663;hp=e77b6dd694541265e5b2a882134c1fb57e6cc8a4;hb=14fe202bdb6cb9a42a620def53f580ab130ae161;hpb=e6d40bd10575970d0b907d21384b8c797b6b6a7c diff --git a/spdtest.py b/spdtest.py index e77b6dd..079f5d2 100644 --- a/spdtest.py +++ b/spdtest.py @@ -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("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-")