This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
pyffi /
| name | age | message | |
|---|---|---|---|
| |
ChangeLog | ||
| |
MANIFEST.in | ||
| |
PyFFI/ | ||
| |
README.txt | ||
| |
examples/ | Sun Jun 24 07:47:28 -0700 2007 | |
| |
niftools/ | ||
| |
rundoctest.py | ||
| |
runtest_old.py | ||
| |
setup.py | ||
| |
tools/ |
README.txt
Installation
------------
python setup.py install
Overview
--------
The general philosophy of this library is to supply all information
that comes naturally from the files, and nothing more. For very common
calculations, we might add some functions to it, to make life easier
for importers and exporters.
To use the library, the cgf.xml file (for example) should reside either in
the module directory (following the current layout on svn), or you
should set the CGFXMLPATH environment variable to the directory where
cgf.xml can be found. If CGFXMLPATH is set, the library will first
look there. The same applies to all other formats.
The code is organized as follows.
* Python File Format Interface - representing a file format specified by an XML
file in Python
- PyFFI/__init__.py
Contains the main metaclass which generates classes for each type
defined in the XML.
- PyFFI/XmlHandler.py
The XML handler, contains the core code that transforms the XML
file into classes. The parser code is based on NifSkope's XML
parser (see http://niftools.sourceforge.net).
- PyFFI/Bases/*
All base classes for various classes generated by the
XmlFileFormat metaclass, i.e. basic and struct. Also contains
the implementation of array's and the expression parser.
* CGF Format Library - instanciates classes, and customize them
- PyFFI/CGF/__init__.py: instanciates classes for the CGF format
- PyFFI/CGF/*.py: customization of particular blocks
* NIF Format Library - similar to CGF
* Utilities
- PyFFI/Utils/__init__.py: collection of random small utilities
+ hexDump: dump file chunk in hexadecimal format
+ walk: a variant of os.walk()
+ PyTriStrip: stripifier utilities (uses a Python port of NvTriStrip)
* tests
- rundoctest.py: runs all tests in the documentation
* examples
- examples/metaclass_simple.py
Proof of concept of how classes can be generated from an xml
description. I keep it there as it could be useful to get a quick
idea of how the XML is converted to a bunch of classes.








