In Windows CMD, you can use the ping
command to get IP from certain sites, for example:
ping www.facebook.com.br
Is there any way to do something similar using Python 3.4?
In Windows CMD, you can use the ping
command to get IP from certain sites, for example:
ping www.facebook.com.br
Is there any way to do something similar using Python 3.4?
I assume it's on windows, right? That is, I think, I can not test. I took from here .
from subprocess import check_output
check_output("ping www.facebook.com", shell=True)
In Linux, already inside the shell of Python 3.2.3, simply simply::
import subprocess
a=subprocess.Popen("ping -c4 www.boadica.com.br", shell=True)
It should work fine on Windows