def main():
    versions = []
    for d in pythondirs:
        fn = "%s/core/constants.py" % d
        ver = find_in_file(fn, 'COREDPY_VERSION', 2)
        if ver:
            ver = ver.strip('"')
            versions.append((d, ver))
        for e in glob.iglob("%s/core_python*egg-info" % d):
            ver = find_in_file(e, 'Version:', 1)
            if ver:
                versions.append((e, ver))
        for e in glob.iglob("%s/netns*egg-info" % d):
            ver = find_in_file(e, 'Version:', 1)
            if ver:
                versions.append((e, ver))
    for d in tcldirs:
        fn = "%s/version.tcl" % d
        ver = find_in_file(fn, 'set CORE_VERSION', 2)
        if ver:
            versions.append((d, ver))

    for (d, ver) in versions:
        print "%8s  %s" % (ver, d)
dataset/ETHPy150Open coreemu/core/daemon/examples/findcore.py/main/original