title: How can I read the contents of an URL with Python?
body: <p>The following works when I paste it on the browser: </p>
  
  <pre><code>http://www.somesite.com/details.pl?urn=2344
  </code></pre>
  
  <p>But when I try reading the URL with Python nothing happens:</p>
  
  <pre><code> link = 'http://www.somesite.com/details.pl?urn=2344'
   f = urllib.urlopen(link)           
   myfile = f.readline()  
   print myfile
  </code></pre>
  
  <p>Do I need to encode the URL, or is there something I'm not seeing?</p>