This repository was archived by the owner on Dec 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
Scripts/Miscellaneous/Wifi_Speed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ A simple Python script that uses 'speedtest' module to test the internet bandwid
4
4
### Prerequisites
5
5
You will need to install speedtest module.
6
6
The installation commands are provided in requirements.txt
7
+ ``` bash
8
+ pip install -r requirements.txt
9
+ ```
7
10
8
11
### How to run the script
9
12
First you have to go to the Wifi_Speed directory. Run the following command once you are in project directory
Original file line number Diff line number Diff line change 1
- speedtest-cli == 2.1.2
1
+ speedtest-cli == 2.1.3
Original file line number Diff line number Diff line change 2
2
3
3
# Python module for testing internet bandwidth
4
4
import speedtest
5
+ from sys import exit
5
6
6
7
# Creating a instance
7
- s = speedtest .Speedtest ()
8
+ try :
9
+ s = speedtest .Speedtest ()
10
+ except speedtest .ConfigRetrievalError :
11
+ print ('Sorry, looks like you are not connected to any network!\n Please make sure you are connected to the internet.' )
12
+ exit ()
8
13
9
14
# Menu
10
15
print ("Select a valid option from below:\n " )
You can’t perform that action at this time.
0 commit comments