-í m ÃEcs3dkZdkTdkTd„ZdS(N(s*cs‹|iddƒd„‰'‡d†}5d„}:d„}Gtii||ƒ}H|i d|d|ƒ|d d values of SUBST_DICT from the source to the target. The values of SUBST_DICT first have any construction variables expanded (its keys are not expanded). If a value of SUBST_DICT is a python callable function, it is called and the result is expanded as the value. If there's more than one source and more than one target, each target gets substituted from the corresponding source. sTOOLSsSUBSTcsýy2t|dƒ}|iƒ}|iƒWn tiid|‚nXx5|i ƒD]$\}}t i|||ƒ}qnWy3 t|dƒ}!|i|ƒ"|iƒWn #$tiid|‚nX%dSdS(sèReplace all instances of the keys of dict with their values. For example, if dict is {'%VERSION%': '1.2345', '%BASE%': 'MyProg'}, then all instances of %VERSION% in the file will be replaced with 1.2345 etc. srbsCan't read source file %sswbsCan't write target file %siN(sopens sourcefilesfsreadscontentssclosesSConssErrorss UserErrorsdictsitemssksvsressubs targetfileswrite(s targetfiles sourcefilesdictsvsfskscontents((sbuild/substin.pysdo_subst_in_files"cs+'(|idƒ o)tiid‚n*t|dƒ}+xœ|iƒD+]‹\}},t |ƒo-|i |ƒƒ|||diƒ}?xz|iƒD?]i\}}@t|ƒoA|i|ƒƒ||