Design idea for Ping Application

Jeremy Hylton jeremy at alum.mit.edu
Tue Aug 19 05:30:09 CEST 2003


On Mon, 2003-08-18 at 19:46, Marc wrote:
> So how can I get information back from the ping pipe without waiting
> for it to finish? I'm also open to other solutions if anyone has come
> across something like this before.

Years ago I wrote ping in Python.  I don't have the code anymore, but
there's not too much too it.  One of the Stevens books has C source for
a simple ping, and it's not much work to adapt the basic design to
Python.  It's far simpler than the C code.

If you had a simple ping library in Python, it would be easy to run
several Ping instances in a single select loop.  Then you don't need to
bother with threads and pipes and shells.

Jeremy







More information about the Python-list mailing list