[Tutor] following the chain
Liam Clarke
cyresse at gmail.com
Wed May 11 02:36:31 CEST 2005
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 <alan.gauld at freenet.co.uk> 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 at 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.'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050511/45372185/attachment.html
More information about the Tutor
mailing list