b.plugin : module documentation

Part of bzrlib

bzr python plugin support.

When load_plugins() is invoked, any python module in any directory in $BZR_PLUGIN_PATH will be imported. The module will be imported as 'bzrlib.plugins.$BASENAME(PLUGIN)'. In the plugin's main body, it should update any bzrlib registries it wants to extend.

See the plugin-api developer documentation for information about writing plugins.

BZR_PLUGIN_PATH is also honoured for any plugins imported via 'import bzrlib.plugins.PLUGINNAME', as long as set_plugins_path has been called.

Function are_plugins_disabled Undocumented
Function disable_plugins Disable loading plugins.
Function set_plugins_path Set the path for plugins to be loaded from.
Function get_core_plugin_path Undocumented
Function get_site_plugin_path Returns the path for the site installed plugins.
Function get_user_plugin_path Undocumented
Function get_standard_plugins_path Determine a plugin path suitable for general use.
Function load_plugins Load bzrlib plugins.
Function load_from_path Load bzrlib plugins found in each dir in dirs.
Function load_from_dir Load the plugins in directory d.
Function plugins Return a dictionary of the plugins.
Class PluginsHelpIndex A help index that returns help topics for plugins.
Class ModuleHelpTopic A help topic which returns the docstring for a module.
Class PlugIn The bzrlib representation of a plugin.
Function _strip_trailing_sep Undocumented
Function _append_new_path Append a new path if it set and not already known.
def are_plugins_disabled():
Undocumented
def disable_plugins():
Disable loading plugins.

Future calls to load_plugins() will be ignored.

def _strip_trailing_sep(path):
Undocumented
def set_plugins_path(path=None):
Set the path for plugins to be loaded from.
ParameterspathThe list of paths to search for plugins. By default, path will be determined using get_standard_plugins_path. if path is [], no plugins can be loaded.
def _append_new_path(paths, new_path):
Append a new path if it set and not already known.
def get_core_plugin_path():
Undocumented
def get_site_plugin_path():
Returns the path for the site installed plugins.
def get_user_plugin_path():
Undocumented
def get_standard_plugins_path():
Determine a plugin path suitable for general use.
def load_plugins(path=None):
Load bzrlib plugins.

The environment variable BZR_PLUGIN_PATH is considered a delimited
set of paths to look through. Each entry is searched for *.py
files (and whatever other extensions are used in the platform,
such as *.pyd).

load_from_dirs() provides the underlying mechanism and is called with
the default directory list to provide the normal behaviour.

:param path: The list of paths to search for plugins.  By default,
    path will be determined using get_standard_plugins_path.
    if path is [], no plugins can be loaded.
def load_from_path(dirs):
Load bzrlib plugins found in each dir in dirs.

Loading a plugin means importing it into the python interpreter. The plugin is expected to make calls to register commands when it's loaded (or perhaps access other hooks in future.)

Plugins are loaded into bzrlib.plugins.NAME, and can be found there for future reference.

The python module path for bzrlib.plugins will be modified to be 'dirs'.

def load_from_dir(d):
Load the plugins in directory d.

d must be in the plugins module path already.

def plugins():
Return a dictionary of the plugins.

Each item in the dictionary is a PlugIn object.

API Documentation for Bazaar, generated by pydoctor at 2010-03-19 00:10:14.