Jump to content

Ping server system


Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • 2 weeks later...
  • Premium

Just to let the others be aware aswell, you can easily get the output of your cmd builtin ping since i don't think you want to implement everything by yourself.

im ATM on linux for win will be slightly different.
 

import subprocess

p = subprocess.Popen(["ping","www.google.com"], stdout=subprocess.PIPE)
print p.communicate()
### Output ###

>>> print p.communicate()
('\n--- www.google.com ping statistics ---\n31 packets transmitted, 31 received, 0% packet loss, time 30042ms\nrtt min/avg/max/mdev = 2.942/4.227/30.166/4.793 ms\n', None)

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.