finchan.exts¶
Extension manager
-
class
finchan.exts.
ExtManager
(env, ext_paths='', **kwargs)[source]¶ Extension manager for finchan.
An finchan extension is an importable Python module that has a function with the signature:
def load_finchan_ext(env): # Do setup
This function is called after your extension is imported. *args and **kwargs is passed from configure file’s
config.live_track_exts
orconfig.backtrack_exts
‘s extension module name section depend on the run mode.You can also optionally define an
unload_finchan_ext()
function, which will be called if the user unloads the extension.You can put your extension modules anywhere you want, as long as they can be imported by Python’s standard import mechanism. However, to make it easy to write extensions, you can also put your extensions in a configured path
config.ext_paths
. This directory is added tosys.path
automatically.