Picorine

Picorine stands for Corinne (a friend of mine who called when I was looking for a name) and the usual pico prefix.

Motivation

Picorine proposes a simple environment for writing code generators (which I spend most of my time writing, being much more fun than just writing programs) based upon XML definitions or models defined using Picore.

dtd2rep

This small utility (so incomplete right now) generates a module containing a set of class for handling XML documents as Python object trees.

XML nodes are defined as class having the same name. Attributes are defined as python attributes having the same name, and child nodes are managed as lists containing object of the node type. Child nodes are accessible through get_ and set_ or add_ methods (depending on the multiplicity of the child).

picorine.core

Mainly provides a base class for writing generator using templates and a generic class for loading XML file as python object trees (the classes of the objects have to be generated first using dtd2rep). See module documentation for more information.

Implementation

It is provided as a python module using distutil. To install Picorine as a module to your system just use the setup.py script for building (as lambda user) and for installing (as root / admin). Then picorine is widely available on your system.


    picorine-0.4.0a $ python setup.py build 
    picorine-0.4.0a $ sudo python setup.py install

Download

Picorine v0.4.0a source archive