GENESIS: Documentation

Related Documentation:

GENESIS3 in Python

To allow more flexible use of GENESIS, bindings in Python are available for each component of G3’s CBI Architecture.

Module hierarchy

The Python module hierarchy is structured very similar to the C-base components that they bind. Each module is also meant to be installed at a particular step in the installation process:

Package Identification

Each Python module that is a part of the CBI Architecture contains a __cbi__ module that contains information about the package such as: name, version, revision, dependencies, and setup tools identifiers. For example, to print the current version for Heccer you would write a script like this:

from heccer.__cbi__ import PackageInfo  
 
_package_info = PackageInfo()  
 
print "The current Heccer version is %s" % _package_info.GetVersion()  

Downloading and installing in python

To make installation of python modules easy, python eggs are available on PyPi, the python package index. They can be installed via the easy_install script that comes with python setuptools. To install the model_container from PyPi simply type the following on the command line:

sudo easy_install model_container

This retrieves the zipped python egg and installs it into your python site-packages directory. After this you can just import the model_container in your scripts.

The PyPi pages for each component can be found via the following links: