当前位置: 首页>>代码示例>>Python>>正文


Python Template.__init__方法代码示例

本文整理汇总了Python中Cheetah.Template.Template.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Template.__init__方法的具体用法?Python Template.__init__怎么用?Python Template.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Cheetah.Template.Template的用法示例。


在下文中一共展示了Template.__init__方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from Cheetah.Template import Template [as 别名]
# 或者: from Cheetah.Template.Template import __init__ [as 别名]
    def __init__(self, *args, **KWs):

        Template.__init__(self, *args, **KWs)
        if not self._CHEETAH__instanceInitialized:
            cheetahKWArgs = {}
            allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
            for k,v in KWs.items():
                if k in allowedKWs: cheetahKWArgs[k] = v
            self._initCheetahInstance(**cheetahKWArgs)
开发者ID:lzimm,项目名称:pervurs,代码行数:11,代码来源:index.py

示例2: __init__

# 需要导入模块: from Cheetah.Template import Template [as 别名]
# 或者: from Cheetah.Template.Template import __init__ [as 别名]
 def __init__(self, *args, **KWs):
     Template.__init__(self, *args, **KWs)
     self._metaTags = {'HTTP-EQUIV':{'keywords':'Cheetah',
                                     'Content-Type':'text/html; charset=iso-8859-1',
                                     }, 
                 'NAME':{'generator':'Cheetah: The Python-Powered Template Engine'}
                 }
     # metaTags = {'HTTP_EQUIV':{'test':1234}, 'NAME':{'test':1234,'test2':1234} }
     self._stylesheets = {}
     # stylesheets = {'.cssClassName':'stylesheetCode'}
     self._stylesheetsOrder = []
     # stylesheetsOrder = ['.cssClassName',]
     self._stylesheetLibs = {}
     # stylesheetLibs = {'libName':'libSrcPath'}
     self._javascriptLibs = {}
     self._javascriptTags = {}
     # self._javascriptLibs = {'libName':'libSrcPath'}
     self._bodyTagAttribs = {}
开发者ID:se210,项目名称:tracy,代码行数:20,代码来源:_SkeletonPage.py

示例3: __init__

# 需要导入模块: from Cheetah.Template import Template [as 别名]
# 或者: from Cheetah.Template.Template import __init__ [as 别名]
 def __init__(self, *args, **KWs):
   # If we have a diamond-inheritence, this function could be called more than once
   # And that would be bad. Let's check for that case, and return if it is the case.
   # Template can deal with being called more than once, but some of the code below
   # wouldn't be safe called more than once
   if self._ScriptElement_haveCalledInit:
     return
   
   self._ScriptElement_haveCalledInit = True
   
   localKWs = self.extractLocalKWs(['xmlElement', 'parent'], KWs)
   
   Template.__init__(self, *args, **KWs)
   
   self.getVar('templates').add(self)
   
   # Only set the dependencies attribute if it isn't taken
   # care of elsewhere
   if not hasattr(type(self), 'dependencies'):
     self.dependencies = set()
   
   assert 'parent' in localKWs
   self.parent = localKWs['parent']
   
   if self.parent and self.parent == self.simulation:
     self.simulation._children.append(self)
   self.xmlElement = localKWs.get('xmlElement', None)
   self.dependenciesEntity = None
   self.functions = {}
   self.codeBlocks = {}
   self._haveBeenRemoved = False
   
   self._children = []
   
   if hasattr(type(self), 'globalNameSpaceName'):
     globalNameSpace = KWs['searchList'][0]
     globalNameSpace[self.globalNameSpaceName] = self
   
   # Create the entry in the callOnceGuards
   _ScriptElement._callOncePerInstanceGuards[self] = set()
开发者ID:GrahamDennis,项目名称:xpdeint,代码行数:42,代码来源:_ScriptElement.py

示例4: __init__

# 需要导入模块: from Cheetah.Template import Template [as 别名]
# 或者: from Cheetah.Template.Template import __init__ [as 别名]
 def __init__(self, filename, projectDirectory, switchProjectPath):
   self.filename = filename
   Template.__init__(self, file=os.path.join(os.path.dirname(__file__), 'core', self.filename + '.tmpl'))
   self.projectDirectory = projectDirectory 
   self.histfilePath     = os.path.join(switchProjectPath, 'history')
开发者ID:flug,项目名称:switch,代码行数:7,代码来源:core.py

示例5: __init__

# 需要导入模块: from Cheetah.Template import Template [as 别名]
# 或者: from Cheetah.Template.Template import __init__ [as 别名]
    def __init__(self, *args, **KWs):
        """
        
        """

        Template.__init__(self, *args, **KWs)
开发者ID:codehaus,项目名称:boo,代码行数:8,代码来源:CSharpTemplate.py

示例6: __init__

# 需要导入模块: from Cheetah.Template import Template [as 别名]
# 或者: from Cheetah.Template.Template import __init__ [as 别名]
 def __init__(self, activity):
   self.activity = activity
   Template.__init__(self, file=os.path.join(os.path.dirname(__file__), 'kde', 'in.tmpl'))
开发者ID:flug,项目名称:switch,代码行数:5,代码来源:kde.py

示例7: __init__

# 需要导入模块: from Cheetah.Template import Template [as 别名]
# 或者: from Cheetah.Template.Template import __init__ [as 别名]
 def __init__(self, filename, key, value):
   self.filename = filename
   self.key = key
   self.value = value
   Template.__init__(self, file=os.path.join(os.path.dirname(__file__), 'alias', self.filename + '.tmpl'))
开发者ID:flug,项目名称:switch,代码行数:7,代码来源:alias.py


注:本文中的Cheetah.Template.Template.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。