I finally got around to getting going on plugin writing so i just want
to check with you guys that I'm heading in the right direction.
Basically i just created a file named plugin.py that is defined as
# Copyright 2008 Gordon Allott <gordallott@...>
# This program is free software; you can redistribute it and/or
# it under the terms of the GNU General Public License as
# the Free Software Foundation; either version 3 of the License,
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
from zope.interface import Interface, Attribute
import zope.interface as interface
from pitivi import plugincore
name = 'test plugin'
catagory = 'test'
description = 'a test plugin, just gets the interface going'
version = 1.0
authors = 'Foobar'
settings = ['foo', 'bar']
enabled = True
def __call__(self, manager):
""" called when the plugin is loaded? """
self.manager = manager
print "Hello World! this is a __call__ function"
def __init__(self, manager=None):
I'm not so sure about the __init__ and call separation, it looks like
IPlugin wants to call __call__ when it loads the plugin
(pluginmanager.py: 361) passing it the manager, just like it specifies
in the IPlugin instance class but instead __init__ gets called.
Gordon Allott <gordallott@...>