Package twisted :: Package python :: Module plugin

[frames | no frames]

## Module twisted.python.plugin

Classes
`DropIn` | I am a Python package containing plugins.tml.
`PlugIn` | I am a Python module registered in a plugins.tml file.

Function Summary
| `_prepCallbacks(debug, progress)`
`list` of `str` | ``getPluginFileList`(debugInspection, showProgress)` Find plugin.tml files in subdirectories of paths in `sys.path`
`list` | ``getPlugIns`(plugInType, debugInspection, showProgress)` Helper function to get all the plugins of a particular type.
| ``isAModule`(d)` This function checks the directory for __init__ files.
`list` | ``loadPlugins`(plugInType, fileList, debugInspection, showProgress)` Traverse the given list of files and attempt to load plugins from them.

Function Details

### getPluginFileList(debugInspection=None, showProgress=None)

Find plugin.tml files in subdirectories of paths in `sys.path`

  Parameters:
    `debugInspection` - 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).
    (type=`None` or a callable taking one argument)
    `showProgress` - 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).
    (type=`None` or a callable taking one argument.)
  Returns:
    A list of the plugin.tml files found.
    (type=`list` of `str`)

### getPlugIns(plugInType, debugInspection=None, showProgress=None)

Helper function to get all the plugins of a particular type.

  Parameters:
    `plugInType` - The type of plugin to search for. This is tested against the `type` argument to the `register` function in the plugin.tml files.
    (type=`str`)
    `debugInspection` - 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).
    (type=`None` or a callable taking one argument)
    `showProgress` - 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).
    (type=`None` or a callable taking one argument.)
  Returns:
    A list of `PlugIn` objects that were found.
    (type=`list`)

### isAModule(d)

This function checks the directory for __init__ files.

### loadPlugins(plugInType, fileList, debugInspection=None, showProgress=None)

Traverse the given list of files and attempt to load plugins from them.

  Parameters:
    `plugInType` - The type of plugin to search for. This is tested against the `type` argument to the `register` function in the plugin.tml files.
    (type=`str`)
    `fileList` - A list of the files to attempt to load plugin information from. One name is put in their scope, the `register` function.
    (type=`list` of `str`)
    `debugInspection` - 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).
    (type=`None` or a callable taking one argument)
    `showProgress` - 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).
    (type=`None` or a callable taking one argument.)
  Returns:
    A list of the `PlugIn` objects found.
    (type=`list`)

Generated by Epydoc 2.0 on Sat May 15 20:08:42 2004 | http://epydoc.sf.net