Every module needs to have a module class which inherits from ModuleBase.
# Copyright (c) <year> <Your name> <Your email> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (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 License # along with this program. If not, see <http://www.gnu.org/licenses/>. from pext_base import ModuleBase from pext_helpers import Action, SelectionType class Module(ModuleBase): def init(self, settings, q): pass def stop(self): pass def selection_made(self, selection): pass def process_response(self, response, identifier): pass
See pext_base.py for detailed information about every function.
Pext provides 2 helpers for modules.
The first type is the Action helper, which supply a list of actions which modules can request Pext to do.
See pext_helpers.py for a list of Actions.
The second type is the SelectionType helper, which supplies an enumerator containing possible selection types that Pext may pass to some functions.
See pext_helpers.py for a list of SelectionTypes.