Popular recipes tagged "retry" but not "except"http://code.activestate.com/recipes/tags/retry-except/2013-05-24T05:19:50-07:00ActiveState Code RecipesRetry loop (Python) 2013-05-23T20:45:01-07:00Ryan Nowakowskihttp://code.activestate.com/recipes/users/4186624/http://code.activestate.com/recipes/578527-retry-loop/ <p style="color: grey"> Python recipe 578527 by <a href="/recipes/users/4186624/">Ryan Nowakowski</a> (<a href="/recipes/tags/exception/">exception</a>, <a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/loop/">loop</a>, <a href="/recipes/tags/retry/">retry</a>, <a href="/recipes/tags/timeout/">timeout</a>). </p> <p>Encapsulates the logic of a retry loop using a generator function.</p> Retry loop (Python) 2013-05-24T05:19:50-07:00Oren Tiroshhttp://code.activestate.com/recipes/users/2033964/http://code.activestate.com/recipes/578163-retry-loop/ <p style="color: grey"> Python recipe 578163 by <a href="/recipes/users/2033964/">Oren Tirosh</a> (<a href="/recipes/tags/exception/">exception</a>, <a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/loop/">loop</a>, <a href="/recipes/tags/retry/">retry</a>, <a href="/recipes/tags/timeout/">timeout</a>). Revision 4. </p> <p>Encapsulates the logic of a retry loop using a generator function.</p> A Python decorator that re-executes the function on condition (Python) 2012-07-24T09:51:48-07:00Chaobin Tang (唐超斌)http://code.activestate.com/recipes/users/4174076/http://code.activestate.com/recipes/578222-a-python-decorator-that-re-executes-the-function-o/ <p style="color: grey"> Python recipe 578222 by <a href="/recipes/users/4174076/">Chaobin Tang (唐超斌)</a> (<a href="/recipes/tags/closure/">closure</a>, <a href="/recipes/tags/decorator/">decorator</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/retry/">retry</a>). Revision 3. </p> <p>Sometimes we want a function to be able to be retried automatically, such as a function that does networking trying to write/read data through a pre-established connection. Instead of writing try/except everywhere, a decorator would save much code and provide a single copy of code to do all the work.</p>