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


Groups > comp.lang.python > #62743 > unrolled thread

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

Started byVincent Davis <vincent@vincentdavis.net>
First post2013-12-26 08:16 -0700
Last post2013-12-26 08:16 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

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

FromVincent Davis <vincent@vincentdavis.net>
Date2013-12-26 08:16 -0700
SubjectRe: Getting updates and restarting a long running url request.
Message-ID<mailman.4635.1388074668.18130.python-list@python.org>

[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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web