ÿØÿà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Áß_ÿÙ ]c@`sdZddlmZmZmZddgZddlZddlZddlZej dej Z ej dej Z ej dej Z d Zej d Zej d Zej d Zd Zej dZdZdZej dZdZdZej dej ZdZdZedZedkryejdZWn#e k rej!Z"ej#Z$n=Xe%edZ"ej&j'e\Z(Z)e(Z*e%e*dZ$e"j+Z,ee,Z-e$j.e-ndS(s process_file(filename) takes templated file .xxx.src and produces .xxx file where .xxx is .pyf .f90 or .f using the following template rules: '<..>' denotes a template. All function and subroutine blocks in a source file with names that contain '<..>' will be replicated according to the rules in '<..>'. The number of comma-separated words in '<..>' will determine the number of replicates. '<..>' may have two different forms, named and short. For example, named: where anywhere inside a block '

' will be replaced with 'd', 's', 'z', and 'c' for each replicate of the block. <_c> is already defined: <_c=s,d,c,z> <_t> is already defined: <_t=real,double precision,complex,double complex> short: , a short form of the named, useful when no

appears inside a block. In general, '<..>' contains a comma separated list of arbitrary expressions. If these expression must contain a comma|leftarrow|rightarrow, then prepend the comma|leftarrow|rightarrow with a backslash. If an expression matches '\' then it will be replaced by -th expression. Note that all '<..>' forms in a block must have the same number of comma-separated entries. Predefined named template rules: i(tdivisiontabsolute_importtprint_functiont process_strt process_fileNs2(\n|\A)(( (\$|\*))|)\s*(subroutine|function)\bs+\n\s*end\s*(subroutine|function)\b.*(\n|\Z)s\n (\$|\*)\s*function\bcC`sg}d}xtrtj||}|dkr7Pn|j}tj|||jrxStr|jd||}|dkrPn|}|||d!dkraPqaqaWn|d7}t j||j}|r|jdpt |}}|j ||fqW|S(s Return a list of tuples for each function or subroutine each tuple is the start and end of a subroutine or function to be expanded. is iis $iN( tTruetroutine_start_retsearchtNonetstarttfunction_start_retmatchtendtrfindtroutine_end_retlentappend(tastrtspanlisttindtmR tiR ((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/from_template.pytparse_structure;s(       &s<\s*(\w[\w\d]*)\s*>s<\s*(\w[\w\d]*)\s*=\s*(.*?)\s*>s<\s*((.*?))\s*>cC`srtj|}i}xV|D]N}|djp;t|}|djdd}t|}|||\d+)\ZcC`s|jd}g|D]}|j^q}xYtt|D]E}tj||}|rAt|jd}||||s @rightarrow@s\c`st|jdjdd}tj|r8d|Sd}x-jD]}||krK|}qKqKW|dkrt}||(RR*Rttemplate_name_reR RR1R(tmobjR"R tkey(tlnames(sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/from_template.pytlistrepls!    sNo replicates found for <%s>t_R$s@comma@sHMismatch in number of replacements (base <%s=%s>) for <%s=%s>. Ignoring.c`s.|jd}j|d|gS(Ni(R*tget(R9R (tktrules(sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/from_template.pytnamereplsts t>t<(RR#Rtsubtlist_reRt template_reRR>t ValueErrort startswithR&RtprintR+R'( tsubstrRR<tnumsubst base_ruletrR"RtruletnumRAtnewstr((R?R;R@sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/from_template.pyt expand_sub~sF     .      (cC`s|}d}t|}d}i}|jtxm|D]e}||||d!7}|jt|||d!|t||d|d!|7}|d}q8W|||7}|S(NRBii(Rtupdatet_special_namesR#RR(tallstrRQtwritestrtstructtoldendRRE((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/from_template.pyRs   "s9(\n|\A)\s*include\s*['\"](?P[\w\d./\\]+[.]src)['\"]cC`stjj|}t|}g}x|D]}tj|}|r|jd}tjj|stjj||}ntjj |rt d||j t |q|j |q+|j |q+W|j|S(NR sIncluding file(tostpathtdirnametopentinclude_src_reR R*tisabsR+tisfileRJtextendtresolve_includesRtclose(tsourcetdtfidtlinestlineRtfn((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/from_template.pyRas     cC`st|}tdj|S(NRB(RaRR+(RcRf((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/from_template.pyRs s <_c=s,d,c,z> <_t=real,double precision,complex,double complex> t__main__iRNtw(/t__doc__t __future__RRRt__all__RYtsystretcompiletIRRR RRGRRFR#R(RRR8RRRR]RaRRTt__name__targvtfilet IndexErrortstdinRetstdouttoutfileR\RZtsplitexttbasetexttnewnametreadRURVtwrite(((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/from_template.pyt.sJ        <