<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: hooks</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>hooks</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br>(built-in)</font></td></tr></table>
<p><tt>The python module for registering and running hooks.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-add"><strong>add</strong></a>(...)</dt><dd><tt><a href="#-add">add</a>(type, function)<br>
<br>
Register a new hook function. Hook functions should take one argument:<br>
an information string that can be parsed with hooks.parse_info</tt></dd></dl>
<dl><dt><a name="-build_info"><strong>build_info</strong></a>(...)</dt><dd><tt><a href="#-build_info">build_info</a>(format, args)<br>
<br>
Returns hook information from a string format and a tuple of values for<br>
the format. Format arguments must be space-separated. They include:<br>
ch, rm, obj, ex, sk, str, int, dbl.</tt></dd></dl>
<dl><dt><a name="-parse_info"><strong>parse_info</strong></a>(...)</dt><dd><tt><a href="#-parse_info">parse_info</a>(info)<br>
<br>
Returns a tuple of parsed hook information.</tt></dd></dl>
<dl><dt><a name="-remove"><strong>remove</strong></a>(...)</dt><dd><tt><a href="#-remove">remove</a>(type, function)<br>
<br>
Unregister a hook function.</tt></dd></dl>
<dl><dt><a name="-run"><strong>run</strong></a>(...)</dt><dd><tt><a href="#-run">run</a>(hooktypes)<br>
<br>
Runs hooks registered to the given type.</tt></dd></dl>
</td></tr></table>
</body></html>