Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
imanJr13 authored Jun 23, 2022
1 parent faeda99 commit b446495
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
# Check-Connectivity-With-Python
Check Connectivity With Python
in ths code with python we check connectivity of server or url and then use windows alarm to notify user;

```
import os
import winsound as ws
hostname = "1.1.1.1" #example
response = os.system("ping -c 1 " + hostname)
#and then check the response...
if response == 0:
ws.Beep(200,1000)
ws.Beep(2000,1000)
else:
print (hostname, 'is down!')
```

0 comments on commit b446495

Please sign in to comment.