Please note: this project is inactive since early 2006

 
3.1.1.1 The minimum

The first option you have is to generate the whole python package AuthorBooks and its modules Writer.py and Book.py.

For that purpose, you'll use the script mdl_generate_python_code.py (note that the same functionalities are also offered in the ZModeler).

On the command-line, type:

mdl_generate_python_code.py model_AuthorBooks.xml

We'll see in the next paragraph that there exists two different way of generating the code. That one is the simplest and uses the default option of the script mdl_generate_python_code.py: -C or --compact-generation-scheme3.1.

The script creates the python package AuthorBooks in the current directory, in which you'll find the following files:

AuthorBooks/
|--   Book.py
|--   Writer.py
|--   __init__.py
|-- * model_AuthorBooks.py
|-- * model_AuthorBooks.xml
`--   setup.py

Note: the files marked with a star (*) are the only one that are overwritten by the script, if they already exist.

This bunch of files gives a minimalist view of what is needed to bind python code to a model and to the framework -this subject is fully discussed in the dedicated section 3.2. You can use it:



Footnotes

...compact-generation-scheme3.1
Please refer to mdl_generate_python_code.py --help for a comprehensive view on the script's usage and options
Comments are welcome: Sebastien Bigaret / Modeling Home Page
Hosted by:SourceForge.net Logo