[Z-Lc9@sdZddlZddlZddlZddlmZmZddlZddlZddlZddl Z ddl Z ddl Z ddl m Z mZddlmZddlmZddlmZddlmZdd lmZmZmZmZmZmZmZmZmZm Z m!Z!dd l"m#Z#m$Z$m%Z%m&Z&e&Z'e%Z(e$Z)ejZ*d e+fd YZ,d e-dfde-dfde-dfde-dfde-dfde.dfde-dfde-dfde-dfde-dfd e.d!fd"e.dfd#e-dfd$d%dfd&e-dfd'e.d(fd)d*d+fdfd,d-d+fdfd.d/dfd0e.dfd1d2dfd3d4dfd5d6d7dfd8d9dfd:e.dfd;e-dfd<e-dfd=e-dfd>e/dfd?gd@fdAgdBfdCgdDfdEgdDfdFgdDfdGgdHfdIgdHfdJgdKfdLe/dMfdNdOdfdPdQdfdRdSdfdTdUdfdVdWdfdXe-dfdYdZdfd[dZdfd\e.dfd]d^dfd_d`dfdadZdfdbdcdddegdfdfe.dfdge.dfdhe-dfdie-dfg7Z0e1ge0D]Z2e2dje2d%f^q:Z3dke4fdlYZ5dme5fdnYZ6doe6fdpYZ7dqj8drdrd6dsZ9dte5fduYZ:dve:fdwYZ;dxee5fdyYZ<e<Z=dS(zs Compiler classes for Cheetah: ModuleCompiler aka 'Compiler' ClassCompiler MethodCompiler If you are trying to grok this code start with ModuleCompiler.__init__, ModuleCompiler.compile, and ModuleCompiler.__getattr__. iN(tgetmtimetexists(tVersiont VersionTuple(tSettingsManager(t indentize(t ErrorCatchers(t NameMapper( tParsert ParseErrort specialVarREt STATIC_CACHEt REFRESH_CACHEt SET_LOCALt SET_GLOBALt SET_MODULEtunicodeDirectiveREtencodingDirectiveREtescapedNewlineRE(tNotFoundt valueForNametvalueFromSearchListtvalueFromFrameOrSearchListtErrorcBseZRS((t__name__t __module__(((s=/opt/freeware/lib/python2.7/site-packages/Cheetah/Compiler.pyR%st useNameMappers<Enable NameMapper for dotted notation and searchList supportt useSearchListsEnable the searchList, requires useNameMapper=True, if disabled, first portion of the $variable is a global, builtin, or local variable that doesn't need looking up in the searchListtallowSearchListAsMethArgttuseAutocallingsKDetect and call callable objects in searchList, requires useNameMapper=TruetuseStackFramessYUsed for NameMapper.valueFromFrameOrSearchList rather than NameMapper.valueFromSearchListtuseErrorCatchersGTurn on the #errorCatcher directive for catching NameMapper errors, etctalwaysFilterNones,Filter out None prior to calling the #filtert useFilterss#If False, pass output through str()tincludeRawExprInFilterArgstuseLegacyImportModesNAll #import statements are relocated to the top of the generated Python moduletprioritizeSearchListOverSelfsuWhen iterating the searchList, look into the searchList passed into the initializer instead of Template members firstt autoAssignDummyTransactionToSelftuseKWsDictArgForPassingTranst commentOffsetitoutputRowColCommentstincludeBlockMarkerss3Wrap #block's in a comment in the template's outputtblockMarkerStarts tblockMarkerEnds