def write_file_map (lys, name): snippet_map = file (os.path.join ( global_options.lily_output_dir, 'snippet-map-%d.ly' % snippet_list_checksum (lys)), 'w') snippet_map.write (""" #(define version-seen #t) #(define output-empty-score-list #f) #(ly:add-file-name-alist '(%s ))\n """ % '\n'.join(['("%s.ly" . "%s")\n' % (ly.basename ().replace('\\','/'), name) for ly in lys]))