Skip to content

imanJr13/Check-Connectivity-With-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

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!')

About

Check Connectivity With Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages