ooici/pyon — pull request #3 by ifreecarve (2011-11-29 19:35:12+00:00)
Title: Refactored generate_interfaces.py to be less spaghetti-based

Overview of changes:
1. Converted to a class instead of using one big function
2. Got rid of OS-specific path splitting and joining
3. Converted to use class-level constants for directory names
4. Some irrelevant code removed
5. Comments added

Tested -- produces the same output as the original (with the exception of timestamps, for obvious reasons).

The initial goal of this edit was to support local overrides to extern/ion-definitions; instead of making changes to that directory or working entirely out of a possibly-obsolete personal fork, the idea would be to have a separate local-definitions directory whose contents would override the corresponding file in ion-definitions. Said functionality has not been added, but the groundwork is certainly there (via the yml_directory_walk function). (This feature would require some coordination with the way that object definitions are handled.)

As-is, this pull request is for a cleaned-up version of the original.