File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ from distutils .command .upload import upload
2+ import speedtest
3+ from time import sleep
4+ speed = speedtest .Speedtest ()
5+ option = int (input ('''Select your option:
6+ 1. Download speed⬇
7+ 2. Upload speed⬆
8+ 3. Download & Upload speed ↕
9+ 4. Ping᭼
10+ ''' ))
11+ if option < 1 or option > 4 :
12+ sleep (2 )
13+ print ('🤖 Sorry, you have entered the wrong option' )
14+ else :
15+ sleep (1 )
16+ print ()
17+ print ('Please wait test in progress...⌛️' )
18+ download_speed = round (speed .download ()/ 1000000 , 3 )
19+ upload_speed = round (speed .upload ()/ 1000000 , 3 )
20+ print ('One moment please 🙂' )
21+ sleep (2.5 )
22+ print ()
23+ if option == 1 :
24+ print (f'The download speed is ' , download_speed , ' Mbps' )
25+ elif option == 2 :
26+ print (f'The upload speed is ' , upload_speed , ' Mbps' )
27+ elif option == 3 :
28+ print (f'The download speed is ' , download_speed ,
29+ ' Mbps and \n the upload speed is ' , upload_speed )
30+ elif option == 4 :
31+ s = [] # empty list
32+ speed .get_servers (s )
33+ print ('Your ping is ' , speed .results .ping , ' ms' )
34+ else :
35+ print ('🤖uhuh, something went wrong please try again' )
You can’t perform that action at this time.
0 commit comments