Getting updates and restarting a long running url request.
Vincent Davis
vincent at vincentdavis.net
Thu Dec 26 10:16:42 EST 2013
On Wed, Dec 25, 2013 at 11:24 PM, Jason Friedman <jsf80238 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20131226/2326a983/attachment.html>
More information about the Python-list
mailing list