Пример #1
0
 def generate_html(self, options, filenameGenerator=tree.getOutputFileName):
     n = default.htmlDefault.copy()
     n.update(options)
     options = n
     try:
         fp = open(options['template'])
         templ = microdom.parse(fp)
     except IOError, e:
         raise process.NoProcessorError(e.filename + ": " + e.strerror)
Пример #2
0
class NevowProcessorFactory:
    def getDoFile(self):
        return nevowify

    def generate_html(self, options, filenameGenerator=tree.getOutputFileName):
        n = default.htmlDefault.copy()
        n.update(options)
        options = n
        try:
            fp = open(options['template'])
            templ = microdom.parse(fp)
        except IOError, e:
            raise process.NoProcessorError(e.filename + ": " + e.strerror)
        except sux.ParseError, e:
            raise process.NoProcessorError(str(e))