Re: Testing for connection to a website

2008-07-17 Thread Venky Shankar
ping the universal DNS ? (4.2.2.2) -Venky On Wed, Jul 16, 2008 at 1:17 AM, Jordan <[EMAIL PROTECTED]> wrote: > On Jul 15, 3:43 pm, Alexnb <[EMAIL PROTECTED]> wrote: > > Okay, I already made this post, but it kinda got lost. So anyway I need > to > > figure out how to test if the user is able

Re: Testing for connection to a website

2008-07-16 Thread Alexnb
Fredrik Lundh wrote: > > Alexnb wrote: > >> e = '' > >> try: >> ... >> except HTTPError, e: >> print e.code >> except URLError, e: >> print e.reason >> >> if e == '': >> print "good to go" > > footnote: here's a better way to test if an exception was raised or not: > >

Re: Testing for connection to a website

2008-07-16 Thread Fredrik Lundh
Alexnb wrote: e = '' try: ... except HTTPError, e: print e.code except URLError, e: print e.reason if e == '': print "good to go" footnote: here's a better way to test if an exception was raised or not: try: ... except HTTPError, e: print e.co

Re: Testing for connection to a website

2008-07-15 Thread Alexnb
Timothy Grant wrote: > > On Tue, Jul 15, 2008 at 3:48 PM, Alexnb <[EMAIL PROTECTED]> wrote: > >> >> >> >> Alexnb wrote: >> > >> > Okay, I already made this post, but it kinda got lost. So anyway I need >> to >> > figure out how to test if the user is able to connect to a specific >> > website.

Re: Testing for connection to a website

2008-07-15 Thread Timothy Grant
On Tue, Jul 15, 2008 at 3:48 PM, Alexnb <[EMAIL PROTECTED]> wrote: > > > > Alexnb wrote: > > > > Okay, I already made this post, but it kinda got lost. So anyway I need > to > > figure out how to test if the user is able to connect to a specific > > website. Last time I got pointed to the urllib2

Re: Testing for connection to a website

2008-07-15 Thread Alexnb
Alexnb wrote: > > Okay, I already made this post, but it kinda got lost. So anyway I need to > figure out how to test if the user is able to connect to a specific > website. Last time I got pointed to the urllib2 page, but if I do > urlopen() and and am not connected, the program stops. So I do

Re: Testing for connection to a website

2008-07-15 Thread Larry Bates
Alexnb wrote: Okay, I already made this post, but it kinda got lost. So anyway I need to figure out how to test if the user is able to connect to a specific website. Last time I got pointed to the urllib2 page, but if I do urlopen() and and am not connected, the program stops. So I don't know if

Re: Testing for connection to a website

2008-07-15 Thread Grant Edwards
On 2008-07-15, Alexnb <[EMAIL PROTECTED]> wrote: > Okay, I already made this post, but it kinda got lost. No, it didn't get lost. Your question was answered and you didn't like the answer. > So anyway I need to figure out how to test if the user is able > to connect to a specific website. Last

Re: Testing for connection to a website

2008-07-15 Thread Jordan
On Jul 15, 3:43 pm, Alexnb <[EMAIL PROTECTED]> wrote: > Okay, I already made this post, but it kinda got lost. So anyway I need to > figure out how to test if the user is able to connect to a specific website. > Last time I got pointed to the urllib2 page, but if I do urlopen() and and > am not con