#NEWLINE# def merge_dictionaries( outof , into , prefix = '\t' ) : #NEWLINE# #INDENT# "Merge the dictionary 'outof' into the dictionary 'into'. If matching keys are found and the value is a\n    dictionary, then the sub dictionary is merged." #NEWLINE# for k in outof . keys ( ) : #NEWLINE# #INDENT# if ( k in into ) : #NEWLINE# #INDENT# if isinstance ( outof [ k ] , dict ) : #NEWLINE# #INDENT# LOG . debug ( '%sMerging:%s' , prefix , k ) #NEWLINE# into [ k ] = merge_dictionaries ( outof [ k ] , into [ k ] , ( prefix + '\t' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# LOG . debug ( '%sSkipping:%s' , prefix , k ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# into [ k ] = outof [ k ] #NEWLINE# #UNINDENT# #UNINDENT# return into