def getPackages(dname, pkgname=None, results=None, ignore=None, parent=None):
    parent = parent or ""
    prefix = []
    if parent:
        prefix = [parent]
    bname = os.path.basename(dname)
    ignore = ignore or []
    if bname in ignore:
        return []
    if results is None:
        results = []
    if pkgname is None:
        pkgname = []
    subfiles = os.listdir(dname)
    abssubfiles = [os.path.join(dname, x) for x in subfiles]
    if '__init__.py' in subfiles:
        results.append(prefix + pkgname + [bname])
        for subdir in filter(os.path.isdir, abssubfiles):
            getPackages(subdir, pkgname=pkgname + [bname],
                        results=results, ignore=ignore,
                        parent=parent)
    res = ['.'.join(result) for result in results]
    return res
Return internal Crubadan code based on ISO 639-3 code
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/python/dist.py/getPackages--crossover with--dataset/ETHPy150Open nltk/nltk/nltk/corpus/reader/crubadan.py/CrubadanCorpusReader.iso_to_crubadan