Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #62743 > unrolled thread
| Started by | Vincent Davis <vincent@vincentdavis.net> |
|---|---|
| First post | 2013-12-26 08:16 -0700 |
| Last post | 2013-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.
Re: Getting updates and restarting a long running url request. Vincent Davis <vincent@vincentdavis.net> - 2013-12-26 08:16 -0700
| From | Vincent Davis <vincent@vincentdavis.net> |
|---|---|
| Date | 2013-12-26 08:16 -0700 |
| Subject | Re: 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
Back to top | Article view | comp.lang.python
csiph-web