#NEWLINE# def substitute_filename( fn , vars ) : #NEWLINE# #INDENT# for ( var , value ) in vars . items ( ) : #NEWLINE# #INDENT# fn = fn . replace ( ( '+%s+' % var ) , str ( value ) ) #NEWLINE# #UNINDENT# return fn