If you are looking for the quickest, most efficient and proper way to ping or check IPs using Python 3 so this short tutorial is for you. This will work for both online or local hosts’ IPs, it just use the default
ping command of the OS, so it doesn’t need any external module and it is still the most efficient way to do the task.
Import the required modules
Import the required modules as following:
Divide the work in functions
The logic of the work is to check the IP in a thread then wait 1 seconds to run another thread and keep doing so in an infinite loop:
Now to check any IP for an infinite time, just call
Author Jagar Yousef