"""Karrigell extension modules
Each extension is saved as a separate python script.
Each script should define a class as follows:
# You will generally want to import k_target.Target
# to access its methods
from k_target import Target
# import other modules as required
import urlparse
class action:
def __init__(self, target):
# target is 'self' from the current target object
self.target = target
def __call__(self, <args>):
# the work happens here ...
# if you need values from the active target object
# created in k_target, use self.target.xxx
# e.g. self.target.script_url
# self.target.handler
k_target.py will add a new built-in function to
the Karrigell function namespace. This makes it available
for use in user scripts as a function with the same
name as the python script.
See other scripts in the extensions directory for examples.
"""
|