Horje
python ping ip address Code Example
python ping ip address
import os

ip_list = ['8.8.8.8']
for ip in ip_list:
    response = os.popen(f"ping {ip}").read()
    if "Received = 4" in response:
        print(f"UP {ip} Ping Successful")
    else:
        print(f"DOWN {ip} Ping Unsuccessful")




Python

Related
how to make computer go in sleep mode using pythn Code Example how to make computer go in sleep mode using pythn Code Example
divide by zero error python exception handling Code Example divide by zero error python exception handling Code Example
format date field in pandas Code Example format date field in pandas Code Example
what happen when we apply * before list in python Code Example what happen when we apply * before list in python Code Example
how to pause code for some time in python Code Example how to pause code for some time in python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7