Answers for "ping website using python"

0

ping with python

import subprocess

def main():
    host = input("Enter Host: ")
    packet = int(input("nEnter Packet: "))
    print("n")
    ping = subprocess.getoutput(f"ping -w {packet} {host}")
    print(ping)

main()
Posted by: Guest on September-17-2021
0

how to get ping from computer IN PYTHON

st = Speedtest()
    print("Download:=>", st.download())
    print("upload:=>", st.upload())
    st.get_servers([])
    print("Ping :=>", st.results.ping)
Posted by: Guest on July-18-2020

Python Answers by Framework

Browse Popular Code Answers by Language