/opt/alt/python27/lib/python2.7/site-packages/jinja2
NameSizeModeActions
testsuite/-0755rm
bccache.py123340644editdlrm
bccache.pyc145570644editdlrm
bccache.pyo146050644editdlrm
compiler.py617850644editdlrm
compiler.pyc560400644editdlrm
compiler.pyo565520644editdlrm
constants.py16260644editdlrm
constants.pyc17070644editdlrm
constants.pyo17070644editdlrm
debug.py109800644editdlrm
debug.pyc110910644editdlrm
debug.pyo110190644editdlrm
defaults.py10680644editdlrm
defaults.pyc16700644editdlrm
defaults.pyo16780644editdlrm
environment.py472440644editdlrm
environment.pyc470130644editdlrm
environment.pyo468190644editdlrm
exceptions.py44280644editdlrm
exceptions.pyc65210644editdlrm
exceptions.pyo65510644editdlrm
ext.py250780644editdlrm
ext.pyc248010644editdlrm
ext.pyo247340644editdlrm
filters.py298360644editdlrm
filters.pyc347800644editdlrm
filters.pyo349660644editdlrm
lexer.py283930644editdlrm
lexer.pyc231650644editdlrm
lexer.pyo232260644editdlrm
loaders.py170360644editdlrm
loaders.pyc194990644editdlrm
loaders.pyo195830644editdlrm
meta.py41900644editdlrm
meta.pyc41220644editdlrm
meta.pyo41220644editdlrm
nodes.py288750644editdlrm
nodes.pyc436530644editdlrm
nodes.pyo438390644editdlrm
optimizer.py23020644editdlrm
optimizer.pyc29290644editdlrm
optimizer.pyo29390644editdlrm
parser.py351860644editdlrm
parser.pyc319130644editdlrm
parser.pyo323340644editdlrm
runtime.py195580644editdlrm
runtime.pyc237850644editdlrm
runtime.pyo239840644editdlrm
sandbox.py134450644editdlrm
sandbox.pyc122710644editdlrm
sandbox.pyo122710644editdlrm
tests.py34440644editdlrm
tests.pyc52570644editdlrm
tests.pyo52590644editdlrm
utils.py161650644editdlrm
utils.pyc201650644editdlrm
utils.pyo203070644editdlrm
visitor.py33160644editdlrm
visitor.pyc39160644editdlrm
visitor.pyo39380644editdlrm
_compat.py40420644editdlrm
_compat.pyc64210644editdlrm
_compat.pyo64310644editdlrm
_stringdefs.py4042910644editdlrm
_stringdefs.pyc2086050644editdlrm
_stringdefs.pyo2086050644editdlrm
__init__.py22700644editdlrm
__init__.pyc24450644editdlrm
__init__.pyo24450644editdlrm
Edit: /opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyo (23984B)
Ñò ÈÏRc@sMdZddklZddklZlZddklZlZl Z l Z l Z l Z l Z ddklZlZlZddklZlZlZlZlZlZlZlZddd d d d d ddddddg ZeZd„ZeƒZd„Z d„Z!d(d(d(d(d„Z#defd„ƒYZ$defd„ƒYZ%y!ddk&l'Z'e'i(e%ƒWne)j onXdefd„ƒYZ*defd„ƒYZ+edefd „ƒYƒZ,d efd!„ƒYZ-ed"efd#„ƒYƒZ.ed$e.fd%„ƒYƒZ/ed&e.fd'„ƒYƒZ0e.`1e/`1e0`1d(S()s} jinja2.runtime ~~~~~~~~~~~~~~ Runtime helpers. :copyright: (c) 2010 by the Jinja Team. :license: BSD. iÿÿÿÿ(tchain(t EvalContextt_context_function_types(tMarkupt soft_unicodetescapetmissingtconcatt internalcodetobject_type_repr(tUndefinedErrortTemplateRuntimeErrortTemplateNotFound(tnexttimapt text_typet iteritemstimplements_iteratortimplements_to_stringt string_typestPY2t LoopContexttTemplateReferencetMacroRR RRRt markup_joint unicode_joint to_stringtidentityR cCs|S(((tx((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyt scCsjg}tt|ƒ}xH|D]@}|i|ƒt|dƒotdƒit||ƒƒSqWt|ƒS(s@Concatenation that escapes if necessary and converts to unicode.t__html__u(RRtappendthasattrRtjoinRR(tseqtbuftiteratortarg((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR%s !cCsttt|ƒƒS(s4Simple args to unicode conversion and concatenation.(RRR(R"((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR0sc CsÀ|djo h}n|o |}nt|pd|}|oh|ot|ƒ}nxNt|ƒD]<\}} |d djo| tj o| ||d(t __class__t__name__R5R:(R6((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyt__repr__Ss (R=t __module__t__doc__R8R;R>(((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyRIs  R)cBsâeZdZdZd „Zd „Zdd „Zd „Zd „Z d„Z e d„ƒZ dd„Z d„ZedƒZedƒZedƒZeo(edƒZedƒZedƒZn[d„Zd„Zd„ZRS(sïThe template context holds the variables of a template. It stores the values passed to the template and also the names the template exports. Creating instances is neither supported nor useful as it's created automatically at various stages of the template evaluation and should not be created by hand. The context is immutable. Modifications on :attr:`parent` **must not** happen and modifications on :attr:`vars` are allowed from generated template code only. Template filters and global functions marked as :func:`contextfunction`\s get the active context passed as first argument and are allowed to access the context read-only. The template context supports read only dict operations (`get`, `keys`, `values`, `items`, `iterkeys`, `itervalues`, `iteritems`, `__getitem__`, `__contains__`). Additionally there is a :meth:`resolve` method that doesn't fail with a `KeyError` but returns an :class:`Undefined` object for missing variables. R1R-R*teval_ctxt exported_varsR:R,t __weakref__cCsh||_h|_||_t|i|ƒ|_tƒ|_||_td„t |ƒDƒƒ|_ dS(Ncss(x!|]\}}||gfVqWdS(N((t.0tktv((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pys {s ( R1R-R*RRAtsetRBR:R(RR,(R6R*R1R:R,((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR8ps     cCsly,|i|}|i|ƒd}||Wn*tj o|iid|ddƒSXt||||ƒS(sRender a parent block.is#there is no parent block called %r.R:tsuper(R,tindext LookupErrorR*t undefinedR9(R6R:tcurrentR,RI((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyRH}s    cCs'y ||SWntj o|SXdS(sfReturns an item from the template context, if it doesn't exist `default` is returned. N(tKeyError(R6R2tdefault((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pytget‰s cCsK||ijo |i|S||ijo |i|S|iid|ƒS(sŽLooks up a variable like `__getitem__` or `get` but returns an :class:`Undefined` object with the name of the name looked up. R:(R-R1R*RK(R6R2((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pytresolve’s   cst‡fd†ˆiDƒƒS(s+Get a new dict with the exported variables.c3s&x|]}|ˆi|fVqWdS(N(R-(RDRE(R6(s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pys žs (R(RB(R6((R6s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyt get_exportedœscCst|i|iS(s`Return a copy of the complete context as dict including the exported variables. (R(R1R-(R6((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pytget_all scOsó|i}x)dD]!}t||ƒo |}PqqWt|tƒovt|ddƒo|f|}q»t|ddƒo|if|}q»t|ddƒo|if|}q»ny|||ŽSWn tj o|iidƒSXdS(sðCall the callable with the arguments and keyword arguments provided but inject the active context or environment as first argument if the callable is a :func:`contextfunction` or :func:`environmentfunction`. tcontextfunctiontevalcontextfunctiontenvironmentfunctionisGvalue was undefined because a callable raised a StopIteration exceptionN(RSRTRU( t__call__R t isinstanceRtgetattrRAR*t StopIterationRK(t_Context__selft _Context__objtargstkwargstfntfn_type((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pytcall¦s&  cCsmt|i|ih|itd|ƒ}|ii|iƒ|i|_|i id„t |i ƒDƒƒ|S(s5Internal helper function to create a derived context.css+x$|]\}}|t|ƒfVqWdS(N(tlist(RDRERF((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pys Ís N( R4R*R:R1tTrueR'R-tupdateRAR,R(R6R0R7((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pytderivedÇs  #cs1‡fd†}ttˆƒi|_ˆ|_|S(Ncst|iƒˆƒƒS((RXRR(R6(tmeth(s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyRÑs(RXR(R@R=(Retproxy((Res?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyt_allÐs tkeystvaluestitemstiterkeyst itervaluesRcCs||ijp ||ijS(N(R-R1(R6R:((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyt __contains__áscCs3|i|ƒ}t|tƒot|ƒ‚n|S(sTLookup a variable or raise `KeyError` if the variable is undefined. (RPRWt UndefinedRM(R6R2titem((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR;äscCs&d|iit|iƒƒ|ifS(Ns <%s %s of %r>(R<R=treprRRR:(R6((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR>ís (sparentsvarss environmentseval_ctxs exported_varssnamesblockss __weakref__N(R=R?R@t __slots__R8RHR'RORPRQRRRR`RdRgRhRiRjRRkRlRRmR;R>(((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR)Zs.  !        (tMappingR9cBs5eZdZd„Zed„ƒZed„ƒZRS(s"One block on a template reference.cCs(||_||_||_||_dS(N(R:t_contextt_stackt_depth(R6R:R7tstacktdepth((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR8s   cCsa|idt|iƒjo!|iiid|iddƒSt|i|i|i|idƒS(sSuper the block.is#there is no parent block called %r.R:RH(RutlenRtRsR*RKR:R9(R6((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyRHs  cCsCt|i|i|iƒƒ}|iiiot|ƒ}n|S(N(RRtRuRsRAt autoescapeR(R6trv((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyRVs(R=R?R@R8tpropertyRHRRV(((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR9ýs  cBsËeZdZddd„Zd„Zed„ƒZed„ƒZed„ƒZ ed„ƒZ ed„ƒZ ed „ƒZ d „Z d „Zd „Zed „ƒZeZ[ed„ƒZd„ZRS(s%A loop context for dynamic iteration.icCsut|ƒ|_||_|iƒ|_d|_||_yt|ƒ|_Wn"t t fj od|_nXdS(Niÿÿÿÿ( titert _iteratort_recurset _safe_nextt_aftertindex0tdepth0Rxt_lengtht TypeErrortAttributeErrorR'(R6titerabletrecurseR‚((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR8s   cGs,|ptdƒ‚n||it|ƒS(s7Cycles among the arguments with the current loop index.sno items for cycling given(R„RRx(R6R\((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pytcycle+scCs |idjS(i(R(R((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR1scCs |itjS((R€t_last_iteration(R((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR2scCs |idS(i(R(R((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR3scCs|i|iS((tlengthR(R((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR4scCs|i|iS((RŠRI(R((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR5scCs |idS(i(R‚(R((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR6scCs|iS(N(RŠ(R6((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyt__len__8scCs t|ƒS(N(tLoopContextIterator(R6((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyt__iter__;scCs,yt|iƒSWntj otSXdS(N(R R}RYR‰(R6((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR>scCs=|idjotdƒ‚n|i||i|idƒS(NsMTried to call non recursive loop. Maybe you forgot the 'recursive' modifier.i(R~R'R„R‚(R6R†((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pytloopDscCsS|idjo<t|iƒ}t|ƒ|_t|ƒ|id|_n|iS(Ni(RƒR'ttupleR}R|RxR(R6R†((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyRŠPs cCsd|ii|i|ifS(Ns <%s %r/%r>(R<R=RIRŠ(R6((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR>\s N(R=R?R@R'R8RˆR{tfirsttlastRItrevindext revindex0RwR‹RRRRŽRVRŠR>(((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyRs"      RŒcBs/eZdZdZd„Zd„Zd„ZRS(s The iterator for a loop context.R7cCs ||_dS(N(R7(R6R7((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR8iscCs|S(N((R6((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyRlscCsW|i}|id7_|itjo tƒ‚n|i}|iƒ|_||fS(Ni(R7RR€R‰RYR(R6tctxt next_elem((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyt__next__os   (scontext(R=R?R@RqR8RR–(((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyRŒds   cBs/eZdZd„Zed„ƒZd„ZRS(sWraps a macro function.c Cs[||_||_t|ƒ|_||_||_||_||_||_||_ dS(N( t _environmentt_funcRxt_argument_countR:t argumentstdefaultst catch_kwargst catch_varargstcaller( R6R*tfuncR:RšR›RœRRž((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR8|s       c Osít||i ƒ}t|ƒ}||ijo²x¯t|it|ƒƒD]\}}y|i|ƒ}Wnatj oUy|i||i|}WqÌtj o#|i i d|d|ƒ}qÌXnX|i |ƒqIWn|i oL|iddƒ}|djo|i i dddƒ}n|i |ƒn|io|i |ƒn1|o)td|itt|ƒƒfƒ‚n|io|i ||iƒn=t|ƒ|ijo&td|it|iƒfƒ‚n|i|ŒS(Nsparameter %r was not providedR:RžsNo caller defineds%macro %r takes no keyword argument %rs+macro %r takes not more than %d argument(s)(RaR™Rxt enumerateRštpopRMR›t IndexErrorR—RKRRžR'RœR„R:R R|RR˜( R6R\R]RštofftidxR:R3Rž((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyRVˆs>       #  cCs4d|ii|idjodp t|iƒfS(Ns<%s %s>t anonymous(R<R=R:R'Rp(R6((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR>²s (R=R?R@R8RRVR>(((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyRys *RncBsõeZdZdZdeded„Zed„ƒZ ed„ƒZ e Z Z Z ZZZZZZZZZZZZZZZZZZZ Z!Z"Z#d„Z$d „Z%d „Z&d „Z'd „Z(d „Z)d„Z*d„Z+RS(sVThe default undefined type. This undefined type can be printed and iterated over, but every other access will raise an :exc:`UndefinedError`: >>> foo = Undefined(name='foo') >>> str(foo) '' >>> not foo True >>> foo + 42 Traceback (most recent call last): ... UndefinedError: 'foo' is undefined t_undefined_hintt_undefined_objt_undefined_namet_undefined_exceptioncCs(||_||_||_||_dS(N(R¦R§R¨R©(R6thinttobjR:texc((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR8Ës   cOs |idjot|itjod|i}qt|itƒp dt|iƒ|if}qdt|iƒ|if}n |i}|i|ƒ‚dS(siRegular callback function for undefined objects that raises an `UndefinedError` on call. s%r is undefineds%s has no element %rs%r has no attribute %rN( R¦R'R§RR¨RWRR R©(R6R\R]Rª((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyt_fail_with_undefined_errorÑs   cCs+|d djot|ƒ‚n|iƒS(Nit__(R…R­(R6R:((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyt __getattr__çscCst|ƒt|ƒjS(N(ttype(R6tother((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyt__eq__ôscCs|i|ƒ S(N(R²(R6R±((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyt__ne__÷scCstt|ƒƒS(N(tidR°(R6((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyt__hash__úscCsdS(Nu((R6((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyt__str__ýscCsdS(Ni((R6((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR‹sccsdS(N((R6((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyRscCstS(N(tFalse(R6((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyt __nonzero__scCsdS(NRn((R6((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR> s(s_undefined_hints_undefined_objs_undefined_names_undefined_exceptionN(,R=R?R@RqR'RR R8RR­R¯t__add__t__radd__t__mul__t__rmul__t__div__t__rdiv__t __truediv__t __rtruediv__t __floordiv__t __rfloordiv__t__mod__t__rmod__t__pos__t__neg__RVR;t__lt__t__le__t__gt__t__ge__t__int__t __float__t __complex__t__pow__t__rpow__R²R³RµR¶R‹RR¸R>(((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyRn¹s f       tDebugUndefinedcBseZdZdZd„ZRS(sAn undefined that returns the debug info when printed. >>> foo = DebugUndefined(name='foo') >>> str(foo) '{{ foo }}' >>> not foo True >>> foo + 42 Traceback (most recent call last): ... UndefinedError: 'foo' is undefined cCsR|idjo7|itjo d|iSdt|iƒ|ifSd|iS(Nu{{ %s }}s{{ no such element: %s[%r] }}u!{{ undefined value printed: %s }}(R¦R'R§RR¨R (R6((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyR¶s   ((R=R?R@RqR¶(((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyRÐs tStrictUndefinedcBs9eZdZdZeiZZZZ Z Z Z Z RS(s=An undefined that barks on print and iteration as well as boolean tests and all kinds of comparisons. In other words: you can do nothing with it except checking if it's defined using the `defined` test. >>> foo = StrictUndefined(name='foo') >>> str(foo) Traceback (most recent call last): ... UndefinedError: 'foo' is undefined >>> not foo Traceback (most recent call last): ... UndefinedError: 'foo' is undefined >>> foo + 42 Traceback (most recent call last): ... UndefinedError: 'foo' is undefined ((R=R?R@RqRnR­RR¶R‹R¸R²R³t__bool__Rµ(((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyRÑ)sN(2R@t itertoolsRt jinja2.nodesRRt jinja2.utilsRRRRRRR tjinja2.exceptionsR R R tjinja2._compatR RRRRRRRt__all__RRtobjectR‰RRR'R4RR)t collectionsRrtregistert ImportErrorR9RRŒRRnRÐRÑRq(((s?/opt/alt/python27/lib/python2.7/site-packages/jinja2/runtime.pyt sF4:       œL@T