示例#1
0
#!/usr/bin/env python
#

import sys
import mutils

if __name__ == "__main__":
    compInfo = mutils.loadComposers()
    for k,v in compInfo.iteritems():
        print k, v

    sys.exit(0)
示例#2
0
文件: lycsv.py 项目: dominicus/mutils

def stripPath(upper, p):
    # Strip the part of the path above ftp
    chunks = upper.split(os.sep)
    for i, v in enumerate(chunks):
        if v == muftp:
            chunks.append(p)
            return os.sep.join(chunks[(i + 1) :])


def showVersionsFor(comp):
    walkTop = os.path.join(mutils.getMutopiaBase(), muftp, comp)
    for root, dirs, files in os.walk(walkTop):
        for f in files:
            version = findVersion(root, f)
            if version != None:
                print u"{!s},{!s}".format(version, stripPath(root, f))


if __name__ == "__main__":

    composers = mutils.loadComposers()

    for k, _ in composers.iteritems():
        logger = logging.getLogger("mutils")
        logger.info(u"Looking at {!s}".format(k))
        showVersionsFor(k)

    sys.exit(0)