ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ ǚPc@sadZddlZddlZddlmZddlmZdefdYZdZdS(s<utilities for generating and formatting literal Python code.iN(tStringIO(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;/opt/alt/python27/lib/python2.7/site-packages/mako/pygen.pyt__init__s      cCs|jj|dS(N(Rtwrite(R ttext((s;/opt/alt/python27/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(RR tretsplitRtappend(R tblocktl((s;/opt/alt/python27/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;/opt/alt/python27/lib/python2.7/site-packages/mako/pygen.pyt writelines2s cCs|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)(R t_flush_adjusted_linestTruetNoneRtmatchRtlent_is_unindentorRRRtSyntaxExceptiontpopRR t _indent_linetsearchtgroupR(R Rthastextt is_commentRtindentortm2((s;/opt/alt/python27/lib/python2.7/site-packages/mako/pygen.pyR7s@     "    cCs|jdS(s1close this printer, flushing any remaining lines.N(R(R ((s;/opt/alt/python27/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;/opt/alt/python27/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;/opt/alt/python27/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;/opt/alt/python27/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;/opt/alt/python27/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 RR2RR t expandtabsRR#RR$R"(R R,tentry((s;/opt/alt/python27/lib/python2.7/site-packages/mako/pygen.pyRs  $ ( t__name__t __module__R R RRRR)RR"R R2R(((s;/opt/alt/python27/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|r3t(((s;/opt/alt/python27/lib/python2.7/site-packages/mako/pygen.pyts