This piece of python code should print out some information, but doesn't
<p>The code I'm tring to get should look something like this:</p>

<blockquote>
  <p>send: 'GET /xml/atom.xml HTTP/1.0\r\nHost: diveintomark.org\r\nUser-Agent: Python-urllib/1.17\r\n\r\n'
  reply: 'HTTP/1.1 410 Gone\r\n'
  header: Date: Sat, 11 Sep 2010 11:47:19 GMT<br>
  header: Server: Apache<br>
  header: Content-Length: 307<br>
  header: Connection: close<br>
  header: Content-Type: text/html; charset=iso-8859-1  </p>
</blockquote>

<p>The code I'm typing in doesn't work. Can anyone please tell me what's wrong with it:</p>

<pre><code>import httplib, urllib2

httplib.HTTPConnection.debuglevel = 1 
request = urllib2.Request('http://www.google.co.uk/')  
opener = urllib2.build_opener()   
feeddata = opener.open(request).read()
</code></pre>
