Re: Testing for Internet Connection

2008-07-17 Thread Venky Shankar
may be try to open a connection to 4.2.2.2 at port 53 ? -vks On Wed, Jul 16, 2008 at 12:13 AM, norseman <[EMAIL PROTECTED]> wrote: > > Grant Edwards wrote: > >> On 2008-07-15, Alexnb <[EMAIL PROTECTED]> wrote: >> >> What exactly do you think will work? I am not sure what you >>> think I should

Re: Testing for Internet Connection

2008-07-15 Thread Grant Edwards
On 2008-07-15, norseman <[EMAIL PROTECTED]> wrote: > Process: > copy/paste into afile > slide lines left to create proper indent values > save > python afile > > I get same as Grant > > > If one does a copy/paste into interactive Python, it does fail. > (Lots of indent error messages. After all,

Re: Testing for Internet Connection

2008-07-15 Thread norseman
Grant Edwards wrote: On 2008-07-15, Alexnb <[EMAIL PROTECTED]> wrote: What exactly do you think will work? I am not sure what you think I should do? If I use urlopen("http://www.google.com";) and I am not connected, I am not going to get an exception, the program will fail. Bullshit. You ge

Re: Testing for Internet Connection

2008-07-15 Thread Grant Edwards
On 2008-07-15, Alexnb <[EMAIL PROTECTED]> wrote: > What exactly do you think will work? I am not sure what you > think I should do? If I use urlopen("http://www.google.com";) > and I am not connected, I am not going to get an exception, > the program will fail. Bullshit. You get an exception. H

Re: Testing for Internet Connection

2008-07-15 Thread Alexnb
not sure what you think I should do? If I use urlopen("http://www.google.com";) and I am not connected, I am not going to get an exception, the program will fail. -- View this message in context: http://www.nabble.com/Testing-for-Internet-Connection-tp18460572p18471183.html Sent from

Re: Testing for Internet Connection

2008-07-15 Thread Alexnb
t; else: > print "We've lost headquarters!" > == > > I hope the code is ok, but there is always something you can do better. > Comments? :) > > Cheers, > Thomas. > -- > h

Re: Testing for Internet Connection

2008-07-15 Thread Grant Edwards
>> If you can define exactly what you mean by "internet connection", the >> test for it becomes correspondingly easier. > Well, really I just need to figure out if I am able to connect > to one site. That site is dictionary.com. Then use urllib2 to try to fetch a page from dictionary.com. If it w

Re: Testing for Internet Connection

2008-07-15 Thread Alexnb
> Well, really I just need to figure out if I am able to connect to one site. That site is dictionary.com. -- View this message in context: http://www.nabble.com/Testing-for-Internet-Connection-tp18460572p18468350.html Sent from the Python - python-list mailing list archive at Nabble.com. -- http://mail.python.org/mailman/listinfo/python-list

Re: Testing for Internet Connection

2008-07-15 Thread Marc Christiansen
Alex Marandon <[EMAIL PROTECTED]> wrote: > Alexnb wrote: >> I am wondering, is there a simple way to test for Internet connection? If >> not, what is the hard way :p > > Trying to fetch the homepage from a few major websites (Yahoo, Google, > etc.)? If all of them are failing, it's very likely th

Re: Testing for Internet Connection

2008-07-15 Thread Thomas Troeger
Alex Marandon wrote: Alexnb wrote: I am wondering, is there a simple way to test for Internet connection? If not, what is the hard way :p Trying to fetch the homepage from a few major websites (Yahoo, Google, etc.)? If all of them are failing, it's very likely that the connection is down. Yo

Re: Testing for Internet Connection

2008-07-15 Thread Ben Finney
Alexnb <[EMAIL PROTECTED]> writes: > I am wondering, is there a simple way to test for Internet > connection? If not, what is the hard way :p Refine the question: What do you mean by "internet"? It isn't a single entity. Do you mean "some particular internet host responding on a particular netwo

Re: Testing for Internet Connection

2008-07-15 Thread Alex Marandon
Alexnb wrote: I am wondering, is there a simple way to test for Internet connection? If not, what is the hard way :p Trying to fetch the homepage from a few major websites (Yahoo, Google, etc.)? If all of them are failing, it's very likely that the connection is down. You can use urllib2 [1]

Testing for Internet Connection

2008-07-15 Thread Alexnb
Hello internet. I am wondering, is there a simple way to test for Internet connection? If not, what is the hard way :p -- View this message in context: http://www.nabble.com/Testing-for-Internet-Connection-tp18460572p18460572.html Sent from the Python - python-list mailing list archive at