[Tutor] best way to tell if i am connected to the internet

Jalil jalilsan at gmail.com
Tue May 1 05:11:17 CEST 2007


ping a host on the net if you get an echo response back you are good.
better yet ping the host  page you are scraping.


On 4/30/07, shawn bright <nephish at gmail.com> wrote:
>
> hello there all,
>
> i am wondering, what would be the simplest way to get a true/false
> am i connected to the internet ?
>
> right now i am using httplib to fetch a webpage every 20 minutes to see,
> but i am thinking that there is a better way,
>
> any suggestions would be encouraging
>
> thanks
> shawn
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070430/254b176b/attachment.htm 


More information about the Tutor mailing list