1   
 2   
 3   
 4   
 5  """ 
 6  Defines the basic interfaces for a plugin. These interfaces are 
 7  inherited by the *core* class of a plugin. The *core* class of a 
 8  plugin is then the one that will be notified the 
 9  activation/deactivation of a plugin via the ``activate/deactivate`` 
10  methods. 
11   
12  For simple (near trivial) plugin systems, one can directly use the 
13  following interfaces. 
14   
15  When designing a non-trivial plugin system, one should create new 
16  plugin interfaces that inherit the following interfaces. 
17  """ 
18   
19   
21          """ 
22          The most simple interface to be inherited when creating a plugin. 
23          """ 
24   
26                  """ 
27                  Set the basic variables. 
28                  """ 
29                  self.is_activated = False 
 30   
32                  """ 
33                  Called at plugin activation. 
34                  """ 
35                  self.is_activated = True 
 36   
38                  """ 
39                  Called when the plugin is disabled. 
40                  """ 
41                  self.is_activated = False 
  42