Module qubx_plugin
source code
Base classes for QUB Express plugins, and sample implementations.
This unit is not required to make a plugin (see qubx.pyenv),
but is intended to simplify and explain the process.
To make a plugin:
* make a folder in qub-express's Plugins folder (e.g. "my_plugin")
* make a subfolder with a unique name for your plugin's package (e.g. "my_plugin/my_uniquestr_package");
the my_plugin folder will be part of sys.path; if there is any other my_uniquestr_package in sys.path, it
may be loaded instead.
* copy this file into my_uniquestr_package; by putting it there, you're guaranteed to import this copy,
and not one from some other plugin.
* make a python module, e.g. "my_uniquestr_package/my_module.py", which starts with "from . import qubx_plugin",
and defines a subclass of one of the plugin base classes.
* make a python module, "my_uniquestr_package/__init__.py" along the lines of:
__all__ = ['qubx_plugin', 'my_module']
or if you want, leave it blank, but make sure it exists.
* make these text files in the my_plugin folder:
- qubx_plugin_about.txt - information for the Admin:Plugins panel
- qubx_plugin_imports.txt - newline-separated list of modules, in the order they should be re-loaded
- qubx_plugin_init.py - python script executed on load;
typically creates and adds one or more "Face" to the tool/about panels.
- qubx_plugin_fini.py - python script executed on unload; typically removes the "Face"(s)
- qubx_plugin_name.txt - name of plugin, as shown in Admin:Plugins panel
For examples, see qubx_sample_plugin, qubx_macroscopic, and qubx_single_molecule.
|
__package__ = ' qubx_testing '
|
|
e = 2.71828182846
|
|
pi = 3.14159265359
|
|
rdbk = ' Expired. '
|
|
rdbreak = ' supporting '
|
|
rdname = ' qubfast.txt '
|