Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #8640

Re: urllib, urlretrieve method, how to get headers?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <chris@rebertia.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.010
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'object.': 0.09; 'question:': 0.09; 'subject:method': 0.09; 'am,': 0.13; 'wrote:': 0.15; 'parts?': 0.16; 'subject:headers': 0.16; 'subject:urllib': 0.16; 'cc:addr:python-list': 0.16; 'bytes': 0.19; 'cheers,': 0.19; 'cc:2**0': 0.21; 'cc:no real name:2**0': 0.22; 'header:In-Reply- To:1': 0.22; 'received:209.85.213.46': 0.23; 'received:mail- yw0-f46.google.com': 0.23; 'pass': 0.28; 'fri,': 0.28; 'message- id:@mail.gmail.com': 0.28; 'cc:addr:python.org': 0.30; 'subject:?': 0.31; 'chris': 0.32; 'actual': 0.35; 'file': 0.36; 'page': 0.36; 'but': 0.37; 'another': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'think': 0.38; 'read,': 0.40; 'received:209': 0.40; 'full': 0.63; 'sender:addr:chris': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=rebertia.com; s=google; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=qXvQw2Kxc07K/JAlZIFji3ZH+819Bb+orCqRC2sNaac=; b=BOHSB+xo7r8/kE1wFDqSF8dZ6/l9lsCJpKHClkJWZFU3oR1zj8wLB/0E5mNp5IK3qe 9cDd+iQZES4KBnEC8LbqzxqcPXPPLbof8yne+abJycnJFCXxwWsxqEdo5fPUt+poaXZj po2HwKgv7rm9M+TQCHCKXaZA6H4o13gwRkaHA=
MIME-Version 1.0
Sender chris@rebertia.com
In-Reply-To <BANLkTinwir_KKhmq1EdQGWLvxLQ4v3CULQ@mail.gmail.com>
References <mailman.536.1309503827.1164.python-list@python.org> <iujtq4$srp$1@solani.org> <BANLkTinNLdfVRt+ExwFaMzM=JAcrJ4NqKQ@mail.gmail.com> <BANLkTi=PeQd_9W1nY4aTpp5gN4sLEWWisQ@mail.gmail.com> <BANLkTinwir_KKhmq1EdQGWLvxLQ4v3CULQ@mail.gmail.com>
Date Fri, 1 Jul 2011 10:02:32 -0700
X-Google-Sender-Auth tmZNSSU3kXf71Tted4OzacK4_Xo
Subject Re: urllib, urlretrieve method, how to get headers?
From Chris Rebert <clp2@rebertia.com>
To Даниил Рыжков <daniil.re@gmail.com>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.545.1309539754.1164.python-list@python.org> (permalink)
Lines 11
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1309539754 news.xs4all.nl 21810 [2001:888:2000:d::a6]:42465
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:8640

Show key headers only | View raw


On Fri, Jul 1, 2011 at 1:53 AM, Даниил Рыжков <daniil.re@gmail.com> wrote:
> Hello again!
> Another question: urlopen() reads full file's content, but how can I
> get page by small parts?

I don't think that's true. Just pass .read() the number of bytes you
want to read, just as you would with an actual file object.

Cheers,
Chris

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

urllib, urlretrieve method, how to get headers? Даниил Рыжков <daniil.re@gmail.com> - 2011-07-01 18:03 +1100
  Re: urllib, urlretrieve method, how to get headers? Peter Otten <__peter__@web.de> - 2011-07-01 09:43 +0200
    Re: urllib, urlretrieve method, how to get headers? Даниил Рыжков <daniil.re@gmail.com> - 2011-07-01 19:26 +1100
    Re: urllib, urlretrieve method, how to get headers? Даниил Рыжков <daniil.re@gmail.com> - 2011-07-01 19:53 +1100
    Re: urllib, urlretrieve method, how to get headers? Kushal Kumaran <kushal.kumaran+python@gmail.com> - 2011-07-01 22:31 +0530
    Re: urllib, urlretrieve method, how to get headers? Chris Rebert <clp2@rebertia.com> - 2011-07-01 10:02 -0700
    Re: urllib, urlretrieve method, how to get headers? Даниил Рыжков <daniil.re@gmail.com> - 2011-07-02 11:47 +1100

csiph-web