#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
from os.path import getmtime, exists
import time
import types
import __builtin__
from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
from Cheetah.Template import Template
from Cheetah.DummyTransaction import DummyTransaction
from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
from Cheetah.CacheRegion import CacheRegion
import Cheetah.Filters as Filters
import Cheetah.ErrorCatchers as ErrorCatchers
from prewikka.templates.ClassicLayout import ClassicLayout
##################################################
## MODULE CONSTANTS
try:
True, False
except NameError:
True, False = (1==1), (1==0)
VFFSL=valueFromFrameOrSearchList
VFSL=valueFromSearchList
VFN=valueForName
currentTime=time.time
__CHEETAH_version__ = '2.0'
__CHEETAH_versionTuple__ = (2, 0, 0, 'final', 0)
__CHEETAH_genTime__ = 1200702933.4929199
__CHEETAH_genTimestamp__ = 'Fri Jan 18 19:35:33 2008'
__CHEETAH_src__ = 'prewikka/templates/MessageSummary.tmpl'
__CHEETAH_srcLastModified__ = 'Fri Aug 10 09:14:40 2007'
__CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine'
if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
raise AssertionError(
'This template was compiled with Cheetah version'
' %s. Templates compiled before version %s must be recompiled.'%(
__CHEETAH_version__, RequiredCheetahVersion))
##################################################
## CLASSES
class MessageSummary(ClassicLayout):
##################################################
## CHEETAH GENERATED METHODS
def __init__(self, *args, **KWs):
ClassicLayout.__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)
def layout_start_hook(self, **KWS):
## CHEETAH: generated from #def layout_start_hook at line 3, col 1.
trans = KWS.get("trans")
if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
trans = self.transaction # is None unless self.awake() was called
if not trans:
trans = DummyTransaction()
_dummyTrans = True
else: _dummyTrans = False
write = trans.response().write
SL = self._CHEETAH__searchList
_filter = self._CHEETAH__currentFilter
########################################
## START - generated method body
write('''
''')
########################################
## END - generated method body
return _dummyTrans and trans.response().getvalue() or ""
def display_table(self, section, depth, **KWS):
## CHEETAH: generated from #def display_table($section, $depth) at line 29, col 1.
trans = KWS.get("trans")
if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
trans = self.transaction # is None unless self.awake() was called
if not trans:
trans = DummyTransaction()
_dummyTrans = True
else: _dummyTrans = False
write = trans.response().write
SL = self._CHEETAH__searchList
_filter = self._CHEETAH__currentFilter
########################################
## START - generated method body
write('''
''')
table_cnt = 0
for table in VFFSL(SL,"section.tables",True): # generated from line 32, col 3
write('''\t\t
''')
if VFFSL(SL,"depth",True) == 0 and VFFSL(SL,"table_cnt",True) > 0 and VFN(VFFSL(SL,"table.style",True),"find",False)("inline") == -1: # generated from line 34, col 3
write('''\t\t
''')
write('''
''')
if VFFSL(SL,"table.odd_even",True): # generated from line 38, col 17
write('''\t\t
| ''') _v = VFFSL(SL,"col.name",True) # '$col.name' on line 50, col 12 if _v is not None: write(_filter(_v, rawExpr='$col.name')) # from line 50, col 12. write(''' | ''') row_class = "table_row_even" elif VFFSL(SL,"col.tables",True): # generated from line 52, col 7 write('''\t\t''') _v = VFFSL(SL,"display_table",False)(VFFSL(SL,"col",True), VFFSL(SL,"depth",True) + 1) # '$display_table($col, $depth + 1)' on line 53, col 12 if _v is not None: write(_filter(_v, rawExpr='$display_table($col, $depth + 1)')) # from line 53, col 12. write(''' | ''') row_class = "" else: # generated from line 55, col 21 write('''\t\t''') _v = VFFSL(SL,"col.name",True) # '$col.name' on line 56, col 31 if _v is not None: write(_filter(_v, rawExpr='$col.name')) # from line 56, col 31. write(''' | ''') write('''\t\t
|---|