Popular recipes tagged "handler" but not "flock"http://code.activestate.com/recipes/tags/handler-flock/2016-11-13T20:17:03-08:00ActiveState Code RecipesTrap KeyboardInterrupt and EOFError for graceful program termination (Python)
2016-11-13T20:17:03-08:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/580718-trap-keyboardinterrupt-and-eoferror-for-graceful-p/
<p style="color: grey">
Python
recipe 580718
by <a href="/recipes/users/4173351/">Vasudev Ram</a>
(<a href="/recipes/tags/ascii/">ascii</a>, <a href="/recipes/tags/error/">error</a>, <a href="/recipes/tags/exception/">exception</a>, <a href="/recipes/tags/handler/">handler</a>, <a href="/recipes/tags/shutdown/">shutdown</a>, <a href="/recipes/tags/terminate/">terminate</a>, <a href="/recipes/tags/utilities/">utilities</a>, <a href="/recipes/tags/utility/">utility</a>).
</p>
<p>This recipe shows how to trap the KeyboardInterrupt and EOFError Python exceptions so that they do not crash your program. As a vehicle to show this, it uses a small Python utility that shows the ASCII code for any ASCII character you type.</p>
RecursionError exception: concise and informative output (Python)
2015-07-05T23:46:59-07:00elazarhttp://code.activestate.com/recipes/users/4187847/http://code.activestate.com/recipes/578660-recursionerror-exception-concise-and-informative-o/
<p style="color: grey">
Python
recipe 578660
by <a href="/recipes/users/4187847/">elazar</a>
(<a href="/recipes/tags/debugging/">debugging</a>, <a href="/recipes/tags/exception/">exception</a>, <a href="/recipes/tags/handler/">handler</a>, <a href="/recipes/tags/recursion/">recursion</a>).
Revision 3.
</p>
<p>Replaces the default exception hook with one that, upon "infinite recursion", removes the last cycle. This results in a significantly cleaner and shorter error message.</p>
<p>Usage: simply import <module> as _</p>
<p>For more details see the descussion here:
<a href="https://mail.python.org/pipermail/python-ideas/2013-September/023190.html" rel="nofollow">https://mail.python.org/pipermail/python-ideas/2013-September/023190.html</a></p>
Cosign Handler (Python)
2012-07-18T13:30:10-07:00Colin Higgshttp://code.activestate.com/recipes/users/4182866/http://code.activestate.com/recipes/578217-cosign-handler/
<p style="color: grey">
Python
recipe 578217
by <a href="/recipes/users/4182866/">Colin Higgs</a>
(<a href="/recipes/tags/authentication/">authentication</a>, <a href="/recipes/tags/cosign/">cosign</a>, <a href="/recipes/tags/handler/">handler</a>, <a href="/recipes/tags/urllib/">urllib</a>).
</p>
<p>Handler (python 3.x urllib.request style) for web pages where cosign authentication is required.</p>
<p>See <a href="http://weblogin.org/">http://weblogin.org/</a> for details of the cosign authentication system.</p>