Ben Finney <[EMAIL PROTECTED]> writes:

> William Xu <[EMAIL PROTECTED]> writes:
>
>> >>> import urllib
>> >>> from BeautifulSoup import BeautifulSoup
>> >>> url = 'http://www.google.com'
>> >>> port = urllib.urlopen(url).read()
>
> Gets the data from the HTTP response. (I'm not sure why you call this
> "port".) The data is HTML text encoded to a string of bytes according
> to the character encoding specified in the response header fields.

i thought we can read and write to a port, like port in scheme. :-)

[...]

> Get the character encoding specified in the HTTP response, and decode
> the data to Unicode from that encoding.

How can i do this? i'm afraid i can't figure it out in the manual..

-- 
William

I just uploaded xtoolplaces-1.6. It fixes all bugs but one: It still
coredumps instead of doing something useful.  The upstream author's
e-mail address bounces, Redhat doesn't provide it and I never used it.
                -- Sven Rudolph <[EMAIL PROTECTED]>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to