Design idea for Ping Application

Andrew Dalke adalke at mindspring.com
Mon Aug 18 22:39:23 EDT 2003


Marc:
> Actually I already have my threads running and can use them to ping using
a
> direct call under the os module. But my problem was being able to have
them
> running continuously.
  ...
> I guess the main question is are there any file functions, like readlines,
> that will only look at the available data and not look for EOF?

Ahh, in that case your problem is you are using 'readlines', which reads
all the lines at once, and waits for the end.  Since you really only want
a line, and it's okay to wait in your thread for that line, use 'readline()'
instead of 'readlines()'.

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list