pycrossword  0.3
Pure-Python implementation of a crossword puzzle generator and editor
Public Member Functions | Public Attributes | List of all members
pycross.utils.pluginbase.PxPluginBase Class Reference

Base class for category-specific user plugins (extensions) written in Python. More...

Inheritance diagram for pycross.utils.pluginbase.PxPluginBase:
pycross.utils.pluginbase.PxPluginGeneral

Public Member Functions

def __init__ (self, plugin_manager)
 Constructor initializes a pointer to the PxPluginManager object. More...
 
def activate (self)
 Called at plugin activation. More...
 
def deactivate (self)
 Called the plugin is disabled. More...
 
def test (self)
 Testing method: prints the plugin's class name by default. More...
 

Public Attributes

 plugin_manager
 

Detailed Description

Base class for category-specific user plugins (extensions) written in Python.

This class must not be subclassed directly; instead, inherit from PxPluginGeneral declared below. A plugin must consist of two items in the 'plugins' directory:

  1. The plugin info file named 'PLUGIN-NAME.pxplugin' that contains the basic plugin info used for locating and loading the plugin.
  2. The plugin file named 'PLUGIN-NAME.py' (if a single module is enough) or plugin subdirectory named simply 'PLUGIN-NAME', which contains 'init.py' and an arbitrary number of source files.
    See also
    Yapsy docs

Constructor & Destructor Documentation

◆ __init__()

def pycross.utils.pluginbase.PxPluginBase.__init__ (   self,
  plugin_manager 
)

Constructor initializes a pointer to the PxPluginManager object.

Member Function Documentation

◆ activate()

def pycross.utils.pluginbase.PxPluginBase.activate (   self)

Called at plugin activation.

◆ deactivate()

def pycross.utils.pluginbase.PxPluginBase.deactivate (   self)

Called the plugin is disabled.

◆ test()

def pycross.utils.pluginbase.PxPluginBase.test (   self)

Testing method: prints the plugin's class name by default.

Member Data Documentation

◆ plugin_manager

pycross.utils.pluginbase.PxPluginBase.plugin_manager

The documentation for this class was generated from the following file: