Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #62743
| References | <CALyJZZXX4cBtx_VVFpEWB8WEkVPNbgj0r-T1XX5nttmZWkNHDw@mail.gmail.com> <CANy1k1jsR3V6muT5HuVRoYMv49MvCRiQCKrmV7c4x2UtrxUJMg@mail.gmail.com> |
|---|---|
| From | Vincent Davis <vincent@vincentdavis.net> |
| Date | 2013-12-26 08:16 -0700 |
| Subject | Re: Getting updates and restarting a long running url request. |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4635.1388074668.18130.python-list@python.org> (permalink) |
[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
Re: Getting updates and restarting a long running url request. Vincent Davis <vincent@vincentdavis.net> - 2013-12-26 08:16 -0700
csiph-web