module to ping a remote computer
Andrew Dalke
adalke at mindspring.com
Wed Oct 20 03:43:34 EDT 2004
anonymous wrote:
> Has anyone here created a module for pinging a remote computer via the ping
> command and displaying a green/red led light button on the local computer
> depending upon the response back? This would be a very simple automatic
> monitor.
Years ago (1998) I wrote a Python wrapper to the command-line
ping program and had it play a sound. Search the newsgroup
archives for "sndping". Here's a Google link
http://groups.google.com/groups?selm=3636B963.2587200C%40bioreason.com&output=gplain
Uggh! I mixed spaces and tabs back then. :(
One problem about ping in the local process is that I believe
it requires root privs. You should likely wrap the
command-line program instead, as I did.
This is exactly the sort of task 'expect' was created for.
You might look at that (it's a Tcl package) or one of the
Python equivalents.
Andrew
dalke at dalkescientific.com
More information about the Python-list
mailing list