Commit Graph

2 Commits

Author SHA1 Message Date
Dave Abrahams
ef711586dd [gyb] Support importing local .py files
Allow the template to import .py files from its own directory.  This is
useful for reusing support code across .gyb files.

Swift SVN r19495
2014-07-03 00:01:42 +00:00
Dave Abrahams
af8421cac8 [utils] Move gyb into a .py file
This allows Python or .gyb files to do "import gyb" and use the basic
components of the system.  For example, we could create a Python
function to generate the boilerplate for a Mirror.  That function could
use gyb.parseTemplate() to load an inline template and
gyb.executeTemplate() to generate the code.  Then calls to that function
can be embedded in ${...} in a .gyb file.

Swift SVN r19490
2014-07-02 23:38:47 +00:00