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


Groups > comp.lang.python > #62743

Re: Getting updates and restarting a long running url request.

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <vincent@vincentdavis.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.047
X-Spam-Evidence '*H*': 0.91; '*S*': 0.00; 'url:pipermail': 0.05; 'subject:Getting': 0.07; 'suppose': 0.07; 'except:': 0.09; 'received:209.85.219': 0.09; 'try:': 0.09; 'wrote:': 0.18; 'wed,': 0.18; 'seems': 0.21; 'appears': 0.22; 'example': 0.22; 'email addr:gmail.com&gt;': 0.22; 'to:name:python-list@python.org': 0.22; 'error': 0.23; 'possibly': 0.26; 'header:In-Reply-To:1': 0.27; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; 'that.': 0.31; '25,': 0.31; 'could': 0.34; 'received:209.85': 0.35; 'connection': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'false': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'received:209': 0.37; 'jason': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'track': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'results.': 0.60; 'lost': 0.61; 'skip:n 10': 0.64; 'more': 0.64; 'internet': 0.71; 'blast': 0.84; 'dict()': 0.84; 'subject:long': 0.84; '2013': 0.98
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=QRk/cgsMxUkyh0xjxBpkTG6otz0PfF/PfAWTX3ts6Tg=; b=Q7qppXX+K4BDoNDu35aeuTR6P8Rj/J7UYoed1dpt2E3vCmQ7X6rFpow7bZhbTP8VEL p0jCLLM9jsv97PfTDTYWp5XxmcqIHTdJo9F+NCwXsV+/6Apm4a13jaR7OBHsn9+Dwllv TZlUWhTEsXeYd77b0CVwGIOgzsouIQ5gnPe4a7Twq+Reffo+pRweIADV2gIQZgzT5kN9 Mw5QrpjloHMuPysFGU8RYlfzjI7WayT7RHc/GWnr3ff10XoaDJUZ2PKedeYWAhZF8Ftm UTVM7RJEIrN7+6WISkfBv5xyIdovnOMj1uHouaiTUyyIgcSTHM94UagrPwNYpgfWFPPh lT6A==
X-Gm-Message-State ALoCoQnH8ynNgE+hbQo4J/M4pRojdON9Vw8dZgwEcs+huOj2bjqpsgsphDuU7VnfYwWWVQF+wo6A
X-Received by 10.182.44.167 with SMTP id f7mr29721365obm.3.1388071022249; Thu, 26 Dec 2013 07:17:02 -0800 (PST)
MIME-Version 1.0
In-Reply-To <CANy1k1jsR3V6muT5HuVRoYMv49MvCRiQCKrmV7c4x2UtrxUJMg@mail.gmail.com>
References <CALyJZZXX4cBtx_VVFpEWB8WEkVPNbgj0r-T1XX5nttmZWkNHDw@mail.gmail.com> <CANy1k1jsR3V6muT5HuVRoYMv49MvCRiQCKrmV7c4x2UtrxUJMg@mail.gmail.com>
From Vincent Davis <vincent@vincentdavis.net>
Date Thu, 26 Dec 2013 08:16:42 -0700
Subject Re: Getting updates and restarting a long running url request.
To "python-list@python.org" <python-list@python.org>
Content-Type multipart/alternative; boundary=001a11c1d7e0345c5804ee71787f
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.4635.1388074668.18130.python-list@python.org> (permalink)
Lines 115
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1388074668 news.xs4all.nl 2859 [2001:888:2000:d::a6]:56805
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:62743

Show key headers only | View raw


[Multipart message β€” attachments visible in raw view] - view raw

On Wed, Dec 25, 2013 at 11:24 PM, Jason Friedman <jsf80238@gmail.com> wrote:

> Could you keep track of success?
>
> result_dict = dict()
> for id in taxid_list:
>     result_dict[id] = False
> while not all(result_dict.values()): # continue if not every ID was
> successful
>     for id in taxid_list:
>         if result_dict[id]:
>             continue # We were already successful with this ID
>         try:
>             this_result = get_BLAST(id)
>             result_dict[id] = True
>         except:
>             print("A warning.")
>

Thanks for your response.​
Would this not keep requesting/submitting additional (duplicate) BLAST
queries?

>  try:
>             this_result = get_BLAST(id)
>             result_dict[id] = True


​It seems like I need to use threading, and there appears to be no way to
know if NCBIWWW.qblast is still waiting on results. It will either give a
result or possibly produce and error I suppose if the for example I lost
the connection to the internet but I am not really sure about that.

That said after some more research I found this tread.
http://lists.open-bio.org/pipermail/biopython/2013-April/008507.html



Vincent Davis

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


Thread

Re: Getting updates and restarting a long running url request. Vincent Davis <vincent@vincentdavis.net> - 2013-12-26 08:16 -0700

csiph-web