def import_mods(directory):
    """Recursively import all python modules in a given directory"""
    for root, dirs, files in os.walk(directory):
        if '.git' in dirs:
            dirs.remove('.git')

        if dirs in 'examples':
            dirs.remove('examples')

        for fn in files:
            filename = os.path.join(root, fn)

            if filename.endswith(".py"):
                #print filename

                modname = filename[2:].replace("/", ".")[:-3]
                #print modname

                if modname in ('setup',):
                    continue

                m = importlib.import_module(modname)
                #print m
dataset/ETHPy150Open CybOXProject/python-cybox/cybox/test/dev.py/import_mods/swapped operands of `in`