pinging in python?

Volucris volucris at hotmail.com
Mon Jul 9 23:36:59 EDT 2001


OK, you said simple:

#on win32 (WinMe at least)
import os
comp = 'www.python.org'
ping = os.popen('ping %s' % comp).read()[-8:-4]
print ping


--

Volucris (a) hotmail.com
"Eu não falo uma única palavra do português."

<deltapigz at telocity.com> wrote in message
news:3B4A6EEC.548A29FD at telocity.com...
> could anyone point out to a simple code of pinging a computer;
> just toping it and get the results; nothing fancy.
>
> i have found source codes along the line but its all too overwhelming,
> and im still a complete newbie despite my half decent understanding of
> python.
>
> thanks in advance,
>
> Adonis
>





More information about the Python-list mailing list