Ñò ha-Kc @sÀdZdZddd!ZddkZddkZddkZddkZyddklZWn#e j oddk lZnXddk l Z d e fd „ƒYZd d d „ƒYZdS(s1Provides a command line interface to compiled Cheetah template modules. Meta-Data ================================================================================ Author: Tavis Rudd Version: $Revision: 1.13 $ Start Date: 2001/12/06 Last Revision Date: $Date: 2006/01/10 20:34:35 $ s!Tavis Rudd s$Revision: 1.13 $i iþÿÿÿiÿÿÿÿN(tload(tVersiontErrorcBseZRS((t__name__t __module__(((sB/usr/lib64/python2.6/site-packages/Cheetah/TemplateCmdLineIface.pyRst CmdLineIfacecBsReZdZeiieidƒeidd„Zd„Z d„Z d„Z RS(s>A command line interface to compiled Cheetah template modules.iicCs||_||_||_dS(N(t _templatet _scriptNamet _cmdLineArgs(tselft templateObjt scriptNamet cmdLineArgs((sB/usr/lib64/python2.6/site-packages/Cheetah/TemplateCmdLineIface.pyt__init__ s  cCs|iƒ|iGHdS(sThe main program controller.N(t_processCmdLineArgsR(R ((sB/usr/lib64/python2.6/site-packages/Cheetah/TemplateCmdLineIface.pytrun(s c Cs_y1ti|iddddgƒ\|_|_Wn5tij o&}|GH|iƒGHtidƒnXxï|iD]ä\}}|d jo|iƒGHtiƒn|djo |ii ƒi d t i ƒn|d jox|d jo,t tiƒ}|ii ƒi d |ƒqWt|ƒ}t |ƒ}|iƒ|ii ƒi d |ƒqsqsWdS( Nththelptenvspickle=is-hs--helps--envis--picklet-(s-hs--help(tgetoptRt_optst_argst GetoptErrortusagetsystexitRt searchListtinserttostenvironRtstdintopentclose(R tvtotat unpickledtf((sB/usr/lib64/python2.6/site-packages/Cheetah/TemplateCmdLineIface.pyR.s0            cCsdh|id6td6S(Ns‡Cheetah %(Version)s template module command-line interface Usage ----- %(scriptName)s [OPTION] Options ------- -h, --help Print this help information --env Use shell ENVIRONMENT variables to fill the $placeholders in the template. --pickle Use a variables from a dictionary stored in Python pickle file to fill $placeholders in the template. If is - stdin is used: '%(scriptName)s --pickle -' Description ----------- This interface allows you to execute a Cheetah template from the command line and collect the output. It can prepend the shell ENVIRONMENT or a pickled Python dictionary to the template's $placeholder searchList, overriding the defaults for the $placeholders. R R(RR(R ((sB/usr/lib64/python2.6/site-packages/Cheetah/TemplateCmdLineIface.pyRLs( RRt__doc__RtpathtbasenameRtargvR RRR(((sB/usr/lib64/python2.6/site-packages/Cheetah/TemplateCmdLineIface.pyRs   ((R't __author__t __revision__RRRtos.pathtcPickleRt ImportErrortpickletCheetah.VersionRt ExceptionRR(((sB/usr/lib64/python2.6/site-packages/Cheetah/TemplateCmdLineIface.pyt s