Package Cheetah :: Module Compiler :: Class ModuleCompiler
[show private | hide private]
[frames | no frames]

Class ModuleCompiler

              GenUtils --+
                         |
_SettingsCollector --+   |
                     |   |
       SettingsManager --+
                         |
                        ModuleCompiler


Method Summary
  __init__(self)
MUST BE CALLED BY SUBCLASSES
  __getattr__(self, name)
Provide one-way access to the methods and attributes of the ClassCompiler, and thereby the MethodCompilers as well.
  __str__(self)
  addAttribute(self, attribName, expr)
  addComment(self, comm)
  addImportedVarNames(self, varNames)
  addImportStatement(self, impStatement)
  addModuleDocString(self, line)
Adds a line to the generated module docstring.
  addModuleGlobal(self, line)
Adds a line of global module code.
  addModuleHeader(self, line)
Adds a header comment to the top of the generated module.
  addSpecialVar(self, basename, contents, includeUnderscores)
Adds module __specialConstant__ to the module globals.
  classDefs(self)
  compile(self)
  getModuleCode(self)
  getModuleEncoding(self)
  importedVarNames(self)
  importStatements(self)
  moduleConstants(self)
  moduleDocstring(self)
  moduleFooter(self)
  moduleHeader(self)
  setBaseClass(self, baseClassName)
  setCompilerSetting(self, key, valueExpr)
  setCompilerSettings(self, keywords, settingsStr)
  setModuleEncoding(self, encoding)
  setShBang(self, shBang)
  specialVars(self)
  timestamp(self, theTime)
  wrapModuleDef(self)
    Inherited from SettingsManager
  copySettings(self)
Returns a shallow copy of the settings dictionary
  deepcopySettings(self)
Returns a deep copy of the settings dictionary
  getConfigString(self)
Return a string with the settings in .ini file format.
  hasSetting(self, key)
True/False
  setSetting(self, name, value)
Set a setting in self._settings.
  setting(self, name, default)
Get a setting from self._settings, with or without a default value.
  settings(self)
Return a reference to the settings dictionary
  updateSettings(self, newSettings, merge)
Update the settings with a selective merge or a complete overwrite.
  updateSettingsFromConfigFile(self, path, **kw)
Update the settings from a text file using the syntax accepted by Python's standard ConfigParser module (like Windows .ini files).
  updateSettingsFromConfigFileObj(self, inFile, convert, merge)
See the docstring for .updateSettingsFromConfigFile()
  updateSettingsFromConfigStr(self, configStr, convert, merge)
See the docstring for .updateSettingsFromConfigFile()
  updateSettingsFromPySrcFile(self, path, merge)
Update the settings from variables in a Python source file.
  updateSettingsFromPySrcStr(self, theString, merge)
Update the settings from a code in a Python src string.
  writeConfigFile(self, path)
Write all the settings that can be represented as strings to an .ini style config file.
    Inherited from GenUtils
  addGetTextVar(self, nameChunks)
Output something that gettext can recognize.
  genCacheInfo(self, cacheTokenParts)
Decipher a placeholder cachetoken
  genCacheInfoFromArgList(self, argList)
  genCheetahVar(self, nameChunks, plain)
  genNameMapperVar(self, nameChunks)
Generate valid Python code for a Cheetah $var, using NameMapper (Unified Dotted Notation with the SearchList).
  genPlainVar(self, nameChunks)
Generate Python code for a Cheetah $var without using NameMapper (Unified Dotted Notation with the SearchList).
  genTimeInterval(self, timeString)

Class Variable Summary
classobj classCompilerClass = Cheetah.Compiler.AutoClassCompiler

Method Details

__init__(self, source=None, file=None, moduleName='DynamicallyCompiledCheetahTemplate', mainClassName=None, mainMethodName=None, baseclassName=None, extraImportStatements=None, settings=None)
(Constructor)

MUST BE CALLED BY SUBCLASSES
Overrides:
Cheetah.SettingsManager.SettingsManager.__init__ (inherited documentation)

__getattr__(self, name)
(Qualification operator)

Provide one-way access to the methods and attributes of the ClassCompiler, and thereby the MethodCompilers as well.

WARNING: Use .setMethods to assign the attributes of the ClassCompiler from the methods of this class!!! or you will be assigning to attributes of this object instead.

addModuleDocString(self, line)

Adds a line to the generated module docstring.

addModuleGlobal(self, line)

Adds a line of global module code. It is inserted after the import statements and Cheetah default module constants.

addModuleHeader(self, line)

Adds a header comment to the top of the generated module.

addSpecialVar(self, basename, contents, includeUnderscores=True)

Adds module __specialConstant__ to the module globals.

Generated by Epydoc 2.1 on Sat Mar 4 13:36:24 2006 http://epydoc.sf.net