ping

TreeView in tkinter freez while updating

TreeView in tkinter freez while updating Question: I am trying to update a treeview every second from a database with clients and ping time status, if the successful ping was before some:X time the row will be red(or odd red to distinguish). update_tree always is running with and sleeping 1 sec between each loop. Also …

Total answers: 1

How to get python code to keep running even if error occurs

How to get python code to keep running even if error occurs Question: the code that i currently use from pythonping import ping import random while 1: d1 = (random.randrange(1,255)) d2 = (random.randrange(1,255)) d3 = (random.randrange(1,255)) d4 = (random.randrange(1,255)) h = f'{d1}.{d2}.{d3}.{d4}’ ping(h, verbose=True) but when an error happens(below) it ends the program how can …

Total answers: 1

Pinging servers in Python

Pinging servers in Python Question: In Python, is there a way to ping a server through ICMP and return TRUE if the server responds, or FALSE if there is no response? Asked By: Kudu || Source Answers: import subprocess ping_response = subprocess.Popen([“/bin/ping”, “-c1”, “-w100”, “192.168.0.1”], stdout=subprocess.PIPE).stdout.read() Answered By: mluebke If you don’t need to support …

Total answers: 32

python non-privileged ICMP

python non-privileged ICMP Question: While trying to figure out the best method to ping (ICMP) something from python, I came across these questions: How can I perform a ping or traceroute in python, accessing the output as it is produced? ping a site in python How can I perform a ping or traceroute using native …

Total answers: 9