Playlists generation for AudioGalaxy

I use audio galaxy and thought it would be nice to create M3U playlists for all my music folders. The result is this simple Python script:

import os
import string

AUDIOGALAXY_PLAYLIST_DIR = r"C:UsersyanMusicAudiogalaxy Playlists"
MUSIC_ROOT_FOLDER = "D:\Music\"
MUSIC_EXTENSIONS = [".mp3",]
PLAYLIST_EXT = ".m3u"

class Playlist:
    def __init__(self, dir):
        self.__name = string.replace(string.split(dir, MUSIC_ROOT_FOLDER, -1)[1], os.path.sep, "_")
        if not self.__name:
            self.__name = "Songs in root"
        self.__songs = []
        for file in [file for file in os.listdir(dir) if not file in [".", ".."]
                     and os.path.splitext(file)[1] in MUSIC_EXTENSIONS]:
            fullname = os.path.join(dir, file)
            if not os.path.isdir(fullname):
                self.__songs.append(fullname)

    def printme(self):
        print "%s - %d songs" % (self.__name, self.countSongs())
        #for song in self.__songs:
        #    print "t%s" % (song,)

    def countSongs(self):
        return len(self.__songs)    

    def save(self, dir):
        if 0 == self.countSongs():
            return
        file = open(os.path.join(dir, self.__name + PLAYLIST_EXT), "w")
        file.write('#EXTM3Un')
        for song in self.__songs:
            file.write(song + "n")
        file.close()

def handle_dir(target_dir, dirname, fnames):
    p = Playlist(dirname)
    p.printme()
    p.save(target_dir)

def main():
    os.path.walk(MUSIC_ROOT_FOLDER, handle_dir, AUDIOGALAXY_PLAYLIST_DIR)

if __name__ == '__main__':
    main()

Just set MUSIC_ROOT_FOLDER to your music files location and AUDIOGALAXY_PLAYLIST_DIR accordingly and run the script.