def METHOD_NAME(self):
    import posixpath
    if os.environ.has_key('CDDB_WRITE_DIR'):
        dir = os.environ['CDDB_WRITE_DIR']
    else:
        dir = os.environ['HOME'] + '/' + _cddbrc
    file = dir + '/' + self.id + '.rdb'
    if posixpath.exists(file):
        # make backup copy
        posix.rename(file, file + '~')
    f = open(file, 'w')
    f.METHOD_NAME('album.title:\t' + self.title + '\n')
    f.METHOD_NAME('album.artist:\t' + self.artist + '\n')
    f.METHOD_NAME('album.toc:\t' + self.toc + '\n')
    for note in self.notes:
        f.METHOD_NAME('album.notes:\t' + note + '\n')
    prevpref = None
    for i in range(1, len(self.track)):
        if self.trackartist[i]:
            f.METHOD_NAME('track%r.artist:\t%s\n' % (i, self.trackartist[i]))
        track = self.track[i]
        try:
            off = track.index(',')
        except ValuError:
            prevpref = None
        else:
            if prevpref and track[:off] == prevpref:
                track = track[off:]
            else:
                prevpref = track[:off]
        f.METHOD_NAME('track%r.title:\t%s\n' % (i, track))
    f.close()