Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(13)  |  Call(13)  |  Derive(0)  |  Import(0)
reads a template

@param templatepath - the relative path (as list of strings) to the 
                      template file, including it as last item

src/a/r/archgenxml-2.6/src/archgenxml/ArchetypesGenerator.py   archgenxml(Download)
    def renderWidget(self, widgetdef):
        """Renders a widget template with the given widget definition"""
        templ = self.readTemplate(['archetypes', 'widgetdef.pysnippet'])
        widgetdef['indent'] = utils.indent
        widgetdef.update(__builtins__)
            fdef['options'][key] = val
 
        templ = self.readTemplate(['archetypes', 'fielddef.pysnippet'])
        dtml = HTML(templ, fdef)
        res = dtml()
                adef['options'][key] = u"%s" % adef['options'][key]
 
        templ = self.readTemplate(['archetypes', 'arrayfielddef.pysnippet'])
        dtml = HTML(templ, adef)
        res = dtml()
                                           element.getPackage().getFilePath(),
                                           'testFunctional.py')):
            file=self.readTemplate(['tests','testFunctional.pydtml'])
            of=self.makeFile(os.path.join(element.getPackage().getFilePath(),
                                          'testFunctional.py'))
    def generateBaseTestcaseClass(self,element,template):
        log.debug('write runalltests.py and framework.py')
        runalltests=self.readTemplate(['tests', 'runalltests.pydtml'])
        framework=self.readTemplate(['tests', 'framework.pydtml'])
 

src/a/r/archgenxml-2.6/src/archgenxml/WorkflowGenerator.py   archgenxml(Download)
            # Generate workflow xml
            log.info("Generating workflow '%s'.", smName)
            templ = self.readTemplate(['profiles', 'definition.xml'])
            scriptpath = os.path.join(smDir, 'definition.xml')
            dtml = HTML(templ, d)
        else:
            parsedModule = PyModule('', mode='string')
        templ = self.readTemplate(['wfsubscribers.pydtml'])
        d = {
            'generator': self,