hooks.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html><head><title>Python: hooks</title>
  3. </head><body bgcolor="#f0f0f8">
  4. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
  5. <tr bgcolor="#7799ee">
  6. <td valign=bottom>&nbsp;<br>
  7. <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>hooks</strong></big></big></font></td
  8. ><td align=right valign=bottom
  9. ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br>(built-in)</font></td></tr></table>
  10. <p><tt>The&nbsp;python&nbsp;module&nbsp;for&nbsp;registering&nbsp;and&nbsp;running&nbsp;hooks.</tt></p>
  11. <p>
  12. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  13. <tr bgcolor="#eeaa77">
  14. <td colspan=3 valign=bottom>&nbsp;<br>
  15. <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
  16. <tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  17. <td width="100%"><dl><dt><a name="-add"><strong>add</strong></a>(...)</dt><dd><tt><a href="#-add">add</a>(type,&nbsp;function)<br>
  18. &nbsp;<br>
  19. Register&nbsp;a&nbsp;new&nbsp;hook&nbsp;function.&nbsp;Hook&nbsp;functions&nbsp;should&nbsp;take&nbsp;one&nbsp;argument:<br>
  20. an&nbsp;information&nbsp;string&nbsp;that&nbsp;can&nbsp;be&nbsp;parsed&nbsp;with&nbsp;hooks.parse_info</tt></dd></dl>
  21. <dl><dt><a name="-build_info"><strong>build_info</strong></a>(...)</dt><dd><tt><a href="#-build_info">build_info</a>(format,&nbsp;args)<br>
  22. &nbsp;<br>
  23. Returns&nbsp;hook&nbsp;information&nbsp;from&nbsp;a&nbsp;string&nbsp;format&nbsp;and&nbsp;a&nbsp;tuple&nbsp;of&nbsp;values&nbsp;for<br>
  24. the&nbsp;format.&nbsp;Format&nbsp;arguments&nbsp;must&nbsp;be&nbsp;space-separated.&nbsp;They&nbsp;include:<br>
  25. ch,&nbsp;rm,&nbsp;obj,&nbsp;ex,&nbsp;sk,&nbsp;str,&nbsp;int,&nbsp;dbl.</tt></dd></dl>
  26. <dl><dt><a name="-parse_info"><strong>parse_info</strong></a>(...)</dt><dd><tt><a href="#-parse_info">parse_info</a>(info)<br>
  27. &nbsp;<br>
  28. Returns&nbsp;a&nbsp;tuple&nbsp;of&nbsp;parsed&nbsp;hook&nbsp;information.</tt></dd></dl>
  29. <dl><dt><a name="-remove"><strong>remove</strong></a>(...)</dt><dd><tt><a href="#-remove">remove</a>(type,&nbsp;function)<br>
  30. &nbsp;<br>
  31. Unregister&nbsp;a&nbsp;hook&nbsp;function.</tt></dd></dl>
  32. <dl><dt><a name="-run"><strong>run</strong></a>(...)</dt><dd><tt><a href="#-run">run</a>(hooktypes)<br>
  33. &nbsp;<br>
  34. Runs&nbsp;hooks&nbsp;registered&nbsp;to&nbsp;the&nbsp;given&nbsp;type.</tt></dd></dl>
  35. </td></tr></table>
  36. </body></html>