While we're on challenge 4, I assume a linked list is important. Can anyone point me at a good introduction to linked lists?

Oh, and Servando - I use urllib like this -

>>>import urllib
>>>opener = urllib.URLopener()
>>> page = opener.open('http://www.google.co.nz')
>>> pageData = page.read()

With urllib (& urllib2) you can add some fancy stuff to the basic URLopener object, including cookie handling.


Regards,


Liam Clarke

On 5/11/05, Alan Gauld <[EMAIL PROTECTED]> wrote:
> import urllib
> name="some URL"
> X = urllib.urlopen(name)
> print X
>
> the output of X in very strange to me. I have include the exact
output:
>   <addinfourl at 585200 whose fp = <socket._fileobject object at
> 0x91068>>

The message is the clue. urlopen returms a fileobject. So you
treat X like an open file. You have to read() from it to get
the data.

Alan G.

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor



--
'There is only one basic human right, and that is to do as you damn well please.
And with it comes the only basic human duty, to take the consequences.'
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to