Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #75118
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed0.kamp.net!newsfeed.kamp.net!feeder1.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.139.MISMATCH!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.083 |
| X-Spam-Evidence | '*H*': 0.83; '*S*': 0.00; 'http': 0.09; 'cc:addr :python-list': 0.11; '24,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:download': 0.16; 'subject:requests': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'module': 0.19; 'pieces': 0.19; 'properly': 0.19; 'thu,': 0.19; 'cc:addr:python.org': 0.22; 'certainly': 0.24; 'server.': 0.24; 'file.': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'though.': 0.31; 'file': 0.32; 'figure': 0.32; 'level.': 0.33; 'subject:with': 0.35; 'connection': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'doing': 0.36; 'possible': 0.36; 'subject:?': 0.36; 'server': 0.38; 'pm,': 0.38; 'how': 0.40; "you're": 0.61; 'first': 0.61; "you'll": 0.62; 'different': 0.65; 'biggest': 0.67; 'benefit': 0.68; 'subjectcharset:utf-8': 0.72; 'cut': 0.74; 'jul': 0.74; 'off,': 0.84; '\xe2\x80\x8d': 0.84; 'to:none': 0.92 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type:content-transfer-encoding; bh=0AQqD6qYMScIGfL3L8YRnq+QwBpq/tOILOyxc93tNyM=; b=AXJrJWz+sXCOX0hW+Mapmm/2+g78IIp7oPoK85K05RBaOseqS4kHyqHbbmfRh/nc99 26mbAQyIV+0rtjSHYhOYpknzSkI5UaX2N1BvfQuCpEc0toa3WewQFkMk9qua6/JO8HuS gDh5fkraUevhGEH8AdieONZ/CajhM3So0L8gvLBMmArEEOvxFwZXNkV2Ce13ED/KnzR/ oIzArFYN0203MQm8BB/26teLoSh/kteJ7dqD7XPnCYBj3IRju4dZkYNYgNIFfBJW6Bl/ GCVKBccSHFszdboGYTZnoJSfymqHbXRnK1o4QiYxCUpNI2nNsns0hvpmzOLzPG6tTl61 BBlg== |
| MIME-Version | 1.0 |
| X-Received | by 10.220.81.194 with SMTP id y2mr7812005vck.29.1406172591994; Wed, 23 Jul 2014 20:29:51 -0700 (PDT) |
| In-Reply-To | <tencent_6F76FA383B9769497E1679BF@qq.com> |
| References | <tencent_11DB8BA910751CAB361D6B09@qq.com> <CAPTjJmpmUYD3N1vgJmJfXxJ=Vcs3f3MNpPDMnByL5GDxYkEOrQ@mail.gmail.com> <tencent_6F76FA383B9769497E1679BF@qq.com> |
| Date | Thu, 24 Jul 2014 13:29:51 +1000 |
| Subject | Re: 回复: how to download special range content with requests in python? |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | python-list <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.12262.1406172594.18130.python-list@python.org> (permalink) |
| Lines | 24 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1406172594 news.xs4all.nl 2898 [2001:888:2000:d::a6]:53796 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:75118 |
Show key headers only | View raw
On Thu, Jul 24, 2014 at 1:21 PM, 水静流深 <1248283536@qq.com> wrote: > i want to write a multiple threads download program to practice my MT > knowledge, > 1)cut the big iso file into 20 parts > 2)start 20 process with threading and queue module to download > 3)combine the 20 parts into one iso file. > > if i have cut it into 20 parts ,how can i download the first part of it ? > > it is target to practice the threading and queue module . Well, first off, this won't really benefit much from threading. The biggest bottleneck is going to be the speed of your connection to that server. Fetching in parts is likely to actually take longer. It's certainly possible to do what you want, though. What you want is to figure out how big the file is, and then ask the server to download different pieces of it. But you'll need to properly understand what you're doing on the HTTP level. I would advise finding some other way to practice threading. ChrisA
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: 回复: how to download special range content with requests in python? Chris Angelico <rosuav@gmail.com> - 2014-07-24 13:29 +1000
csiph-web