def write_m3u_playlist(filename, files):
    """
    Write an M3U playlist named filename containing files.
    """
    out = open(filename, 'w', encoding='windows-1252')
    for f in files:
        out.write(f)
        out.write('\n')
    out.close()
