twisted.python.plugin.html   [plain text]


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>twisted.python.plugin</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">

<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="twisted.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://twistedmatrix.com/">Twisted&nbsp;1.3.0rc1</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <font size="-1"><b class="breadcrumbs">
        <a href="twisted.html">Package&nbsp;twisted</a> ::
        <a href="twisted.python.html">Package&nbsp;python</a> ::
        Module&nbsp;plugin
      </b></font></br>
    </td>
    <td><table cellpadding="0" cellspacing="0">
      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="twisted.python.plugin.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
    </table></td>
</tr></table>

<!-- =========== START OF MODULE DESCRIPTION =========== -->
<h2 class="module">Module twisted.python.plugin</h2>


<!-- =========== START OF CLASSES =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Classes</th></tr>
<tr><td width="15%">
  <b><a href="twisted.python.plugin.DropIn.html"><code>DropIn</code></a></b></td>
  <td>I am a Python package containing plugins.tml.</td></tr>
<tr><td width="15%">
  <b><a href="twisted.python.plugin.PlugIn.html"><code>PlugIn</code></a></b></td>
  <td>I am a Python module registered in a plugins.tml file.</td></tr>
</table><br />


<!-- =========== START OF FUNCTION SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Function Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="_prepCallbacks"></a><span class="summary-sig"><span class="summary-sig-name">_prepCallbacks</span>(<span class=summary-sig-arg>debug</span>,
          <span class=summary-sig-arg>progress</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">        <code>list</code> of <code>str</code>
</font></td>
  <td><code><span class="summary-sig"><a href="twisted.python.plugin.html#getPluginFileList" class="summary-sig-name"><code>getPluginFileList</code></a>(<span class=summary-sig-arg>debugInspection</span>,
          <span class=summary-sig-arg>showProgress</span>)</span></code>
<br />
Find plugin.tml files in subdirectories of paths in 
<code>sys.path</code></td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">        <code>list</code>
</font></td>
  <td><code><span class="summary-sig"><a href="twisted.python.plugin.html#getPlugIns" class="summary-sig-name"><code>getPlugIns</code></a>(<span class=summary-sig-arg>plugInType</span>,
          <span class=summary-sig-arg>debugInspection</span>,
          <span class=summary-sig-arg>showProgress</span>)</span></code>
<br />
Helper function to get all the plugins of a particular type.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="twisted.python.plugin.html#isAModule" class="summary-sig-name"><code>isAModule</code></a>(<span class=summary-sig-arg>d</span>)</span></code>
<br />
This function checks the directory for __init__ files.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">        <code>list</code>
</font></td>
  <td><code><span class="summary-sig"><a href="twisted.python.plugin.html#loadPlugins" class="summary-sig-name"><code>loadPlugins</code></a>(<span class=summary-sig-arg>plugInType</span>,
          <span class=summary-sig-arg>fileList</span>,
          <span class=summary-sig-arg>debugInspection</span>,
          <span class=summary-sig-arg>showProgress</span>)</span></code>
<br />
Traverse the given list of files and attempt to load plugins from 
them.</td></tr>
</table><br />


<!-- =========== START OF FUNCTION DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
  <th colspan="2">Function Details</th></tr>
</table>

<a name="getPluginFileList"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">getPluginFileList</span>(<span class=sig-arg>debugInspection</span>=<span class=sig-default>None</span>,
          <span class=sig-arg>showProgress</span>=<span class=sig-default>None</span>)</span>
  </h3>
  Find plugin.tml files in subdirectories of paths in 
  <code>sys.path</code>
  <dl><dt></dt><dd>
    <dl><dt><b>Parameters:</b></dt>
      <dd><code><b>debugInspection</b></code> -
         If not None, this is invoked with strings containing debug 
        information about the loading process. If it is any other true 
        value, this debug information is written to stdout (This behavior 
        is deprecated).
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=<code>None</code> or a callable taking one argument)</i>
      <dd><code><b>showProgress</b></code> -
         If not None, this is invoked with floating point values 
        between 0 and 1 describing the progress of the loading process. 
        If it is any other true value, this progress information is 
        written to stdout. (This behavior is deprecated).
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=<code>None</code> or a callable taking one argument.)</i>
      </dd>
    </dl>
    <dl><dt><b>Returns:</b></dt>
      <dd>
        A list of the plugin.tml files found.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=<code>list</code> of <code>str</code>)</i>
      </dd>
    </dl>
  </dd></dl>
</td></tr></table>

<a name="getPlugIns"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">getPlugIns</span>(<span class=sig-arg>plugInType</span>,
          <span class=sig-arg>debugInspection</span>=<span class=sig-default>None</span>,
          <span class=sig-arg>showProgress</span>=<span class=sig-default>None</span>)</span>
  </h3>
  Helper function to get all the plugins of a particular type.
  <dl><dt></dt><dd>
    <dl><dt><b>Parameters:</b></dt>
      <dd><code><b>plugInType</b></code> -
         The type of plugin to search for. This is tested against the 
        <code>type</code> argument to the <code>register</code> function 
        in the plugin.tml files.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=<code>str</code>)</i>
      <dd><code><b>debugInspection</b></code> -
         If not None, this is invoked with strings containing debug 
        information about the loading process. If it is any other true 
        value, this debug information is written to stdout (This behavior 
        is deprecated).
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=<code>None</code> or a callable taking one argument)</i>
      <dd><code><b>showProgress</b></code> -
         If not None, this is invoked with floating point values 
        between 0 and 1 describing the progress of the loading process. 
        If it is any other true value, this progress information is 
        written to stdout. (This behavior is deprecated).
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=<code>None</code> or a callable taking one argument.)</i>
      </dd>
    </dl>
    <dl><dt><b>Returns:</b></dt>
      <dd>
        A list of <code>PlugIn</code> objects that were found.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=<code>list</code>)</i>
      </dd>
    </dl>
  </dd></dl>
</td></tr></table>

<a name="isAModule"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">isAModule</span>(<span class=sig-arg>d</span>)</span>
  </h3>
  This function checks the directory for __init__ files.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="loadPlugins"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">loadPlugins</span>(<span class=sig-arg>plugInType</span>,
          <span class=sig-arg>fileList</span>,
          <span class=sig-arg>debugInspection</span>=<span class=sig-default>None</span>,
          <span class=sig-arg>showProgress</span>=<span class=sig-default>None</span>)</span>
  </h3>
  Traverse the given list of files and attempt to load plugins from 
  them.
  <dl><dt></dt><dd>
    <dl><dt><b>Parameters:</b></dt>
      <dd><code><b>plugInType</b></code> -
         The type of plugin to search for. This is tested against the 
        <code>type</code> argument to the <code>register</code> function 
        in the plugin.tml files.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=<code>str</code>)</i>
      <dd><code><b>fileList</b></code> -
         A list of the files to attempt to load plugin information 
        from. One name is put in their scope, the <code>register</code> 
        function.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=<code>list</code> of <code>str</code>)</i>
      <dd><code><b>debugInspection</b></code> -
         If not None, this is invoked with strings containing debug 
        information about the loading process. If it is any other true 
        value, this debug information is written to stdout (This behavior 
        is deprecated).
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=<code>None</code> or a callable taking one argument)</i>
      <dd><code><b>showProgress</b></code> -
         If not None, this is invoked with floating point values 
        between 0 and 1 describing the progress of the loading process. 
        If it is any other true value, this progress information is 
        written to stdout. (This behavior is deprecated).
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=<code>None</code> or a callable taking one argument.)</i>
      </dd>
    </dl>
    <dl><dt><b>Returns:</b></dt>
      <dd>
        A list of the <code>PlugIn</code> objects found.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=<code>list</code>)</i>
      </dd>
    </dl>
  </dd></dl>
</td></tr></table>
<br />


<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="twisted.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://twistedmatrix.com/">Twisted&nbsp;1.3.0rc1</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sat May 15 20:08:42 2004</font></td>
    <td align="right"><a href="http://epydoc.sourceforge.net"
                      ><font size="-2">http://epydoc.sf.net</font></a></td>
  </tr>
</table>
</body>
</html>