<div dir="ltr"><br>may be try to open a connection to <a href="http://4.2.2.2">4.2.2.2</a> at port 53 ? <br><br>-vks<br><br><div class="gmail_quote">On Wed, Jul 16, 2008 at 12:13 AM, norseman <<a href="mailto:norseman@hughes.net">norseman@hughes.net</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
Grant Edwards wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 2008-07-15, Alexnb <<a href="mailto:alexnbryan@gmail.com" target="_blank">alexnbryan@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
What exactly do you think will work? I am not sure what you<br>
think I should do? If I use urlopen("<a href="http://www.google.com" target="_blank">http://www.google.com</a>")<br>
and I am not connected, I am not going to get an exception,<br>
the program will fail.<br>
</blockquote>
<br>
Bullshit.  You get an exception.  Here's my program:<br>
<br>
   import urllib2<br>
   try:<br>
       con = urllib2.urlopen("<a href="http://www.google.com/" target="_blank">http://www.google.com/</a>")<br>
       data = con.read()<br>
       print data<br>
   except:<br>
       print "failed"<br>
<br>
If I run it with no internet connection, I get this:<br>
<br>
   $ python testit.py<br>
   failed<br>
<br>
If I bring up the internet connection, then I get a bunch of<br>
HTML.   <br>
</blockquote></div>
=============================<br>
Yep -me two<br>
<br>
Process:<br>
copy/paste into afile<br>
slide lines left to create proper indent values<br>
save<br>
python afile<br>
<br>
I get same as Grant<br>
<br>
<br>
If one does a copy/paste into interactive Python, it does fail.<br>
(Lots of indent error messages.  After all, it is Python :)<br>
<br>
<br>
Steve<br><font color="#888888">
<a href="mailto:norseman@hughes.net" target="_blank">norseman@hughes.net</a></font><div><div></div><div class="Wj3C7c"><br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br></div>