PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  Qc@sEdZddlZddlmZdefdYZdZdS(s<utilities for generating and formatting literal Python code.iN(t exceptionst PythonPrintercBsneZdZdZdZdZdZdZdZddZ d Z d Z d Z RS( cCsDd|_g|_d|_||_g|_t|_|jdS(Nis (tindentt indent_detailt indentstringtstreamt line_buffertFalsetin_indent_linest_reset_multi_line_flags(tselfR((s./usr/lib/python2.7/site-packages/mako/pygen.pyt__init__ s      cCs|jj|dS(N(Rtwrite(R ttext((s./usr/lib/python2.7/site-packages/mako/pygen.pyR %scCs:t|_x*tjd|D]}|jj|qWdS(sprint a line or lines of python which already contain indentation. The indentation of the total block of lines will be adjusted to that of the current indent level.s\r?\nN(RRtretsplitRtappend(R tblocktl((s./usr/lib/python2.7/site-packages/mako/pygen.pytwrite_indented_block(s cGs"x|D]}|j|qWdS(s"print a series of lines of python.N(t writeline(R tlinestline((s./usr/lib/python2.7/site-packages/mako/pygen.pyt writelines1s c Cs|js|jt|_n|dksOtjd|sOtjd|rXt}nt}|o}t|o}|ddk}| r| s|j|r|j dkr|j d8_ t|j dkrt j dn|j j qn|dkrdS|jj|j|dtjd |rtjd |}|r}|jd}|j d7_ |j j|qd}tjd |}|r|j d7_ |j j|qndS( sprint a line of python, indenting it according to the current indent level. this also adjusts the indentation counter according to the content of the line. s^\s*#s^\s*$it#isToo many whitespace closuresNs s:[ \t]*(?:#.*)?$s ^\s*(if|try|elif|while|for|with)s(^\s*(def|class|else|elif|except|finally)(Rt_flush_adjusted_linestTruetNoneRtmatchRtlent_is_unindentorRRRtSyntaxExceptiontpopRR t _indent_linetsearchtgroupR(R Rthastextt is_commentRtindentortm2((s./usr/lib/python2.7/site-packages/mako/pygen.pyR6s@     "    cCs|jdS(s1close this printer, flushing any remaining lines.N(R(R ((s./usr/lib/python2.7/site-packages/mako/pygen.pytclose|scCsVt|jdkrtS|jd}|dkr6tStjd|}|sRtStS(sqreturn true if the given line is an 'unindentor', relative to the last 'indent' event received. iis"^\s*(else|elif|except|finally).*\:N(RRRRRRR(R RR&R((s./usr/lib/python2.7/site-packages/mako/pygen.pyRs  tcCs!tjd||j|j|S(sindent the given line according to the current indent level. stripspace is a string of space that will be truncated from the start of the line before indenting.s^%s(RtsubRR(R Rt stripspace((s./usr/lib/python2.7/site-packages/mako/pygen.pyR!scCstt|_|_dS(s^reset the flags which would indicate we are in a backslashed or triple-quoted section.N(Rt backslashedt triplequoted(R ((s./usr/lib/python2.7/site-packages/mako/pygen.pyR scCs|jp|j}tjd|r0t|_n t|_ttjd|}|dksm|ddkr}|j |_n|S(screturn true if the given line is part of a multi-line block, via backslash or triple-quote.s\\$s \"\"\"|\'\'\'iii(R,R-RR"RRRtfindall(R Rt current_statettriples((s./usr/lib/python2.7/site-packages/mako/pygen.pyt_in_multi_lines   cCsd}|jx|jD]}|j|rF|jj|dq|j}|dkrtjd|rtj d|j d}n|jj|j ||dqWg|_|jdS(Ns s^[ \t]*[^# \t]s ^([ \t]*)i( RR RR1RR t expandtabsRR"RR#R!(R R+tentry((s./usr/lib/python2.7/site-packages/mako/pygen.pyRs  $ ( t__name__t __module__R R RRRR(RR!R R1R(((s./usr/lib/python2.7/site-packages/mako/pygen.pyR s    F  +  csttgd \fd}dd}g}d }xtjd|D]}||rz|j|qX|j}|d krtjd|rtjd|jd}n|j|||qXWd j |S( s<remove the left-whitespace margin of a block of Python code.iicsp}tjd|r3ts