Home | Download/Install | Documentation | Packages | Screenshots | News | Forum/Mailing-lists | Contact | GForge
For general informations about installation, please read the Installation guide.
If you are looking for a specific package installation, refer to the package documentation.
Models under OpenAlea are in the form of components that could be used as such, or combined together to build user-customised applications. OpenAlea provides two different ways to interacts with components:
Both methods allows you to save your application and run it routinely in batch mode. Visual programming is easier to start with, and it allows you to rapidly discover components of a package. Python scripting allows for programming more complex tasks, and provides an access to additional functionalities of models, by importing python modules that compose them.
OpenAlea provides an high level visual programming interface Visualea
OpenAlea packages are available under the python scripting language. This allows to use the components of packages (as in visualea), but also to directly import python modules and get access to all functionalities documented in package's API.
Python is a scripting language widely spread in the scientific community. It has a lot of advantages :
You can learn the basics with the official tutorial or the English/French translated online book Dive into python.
Python scripts could be launched by invoking python from a command line, e.g. :
python myScript.py
You can also launch a Python interpreter and run or test your script step by step.
The default interpreter could be launch by typing python in a terminal (Linux, Mac) or in a DOS windows. Under Windows, you may also use one of the following method:
You can also use more ergonomic user interface, like ipython, that provides usefull functionalities (completion, coloration, execution of block of lines,…)
The magic line which will make available all openalea modules is :
import openalea
All OpenAlea modules are available in the openalea
namespace. Refer to the modules documentation
to learn how to use them.
You can also write simple python scripts in order to execute the same code several times.
All the openalea nodes available from the package manager can be run from any Python script. To do so, you will have to import the package manager, retrieve the node factory of the component you want to use, and transform it into a regular python function. The openalea.core package has functionalities that facilitate this task. For instance, to run the node '+' in the package 'openalea.math', you can type:
from openalea.core.alea import load_package_manager, function pm = load_package_manager() node_factory = pm['openalea.math']['+'] sum = function(node_factory) c = sum(1,2) d= sum(a=1,b=2)
Note that for dataflows, arguments to the function correspond to ports of the IN node, and returned values to the ports of the OUT node.