Automatical extraction of openalea factories for python modules and packages
TODO: bad name. The module is not parsed but imported.
-
core.factory_parser.add_factory(pkg, fct, base_dir=None)[source]
Add a (Node) Factory for function fct into package pkg
If function does not contain suitable meta_info, try to take it from pkg_info
-
core.factory_parser.import_module(module_name, search_path=[])[source]
load module_name
Inputs: |
- module_name
string with the name of the module as it is given to import
(i.e. containing package dependancies separated by '.')
- search_path
Additional search directories, given as a list of string, to look for
module_name (and its parent package) if it is in not in sys.path.
|
-
core.factory_parser.parse_module(module, module_dir=None)[source]
Create an openalea package from a python module
- :Inputs::
- module:
- either a python module
- or the full name of the module to parse (e.g. 'pkg.sub_pkg.module')
- module_dir:
- Base directory of module if it is not in the python path.