def action_modules_from_package(package_name):
    res = list()
    splitted = package_name.split(".")[1:]
    last_part = ".".join(splitted)
    package = __import__(package_name, globals(), locals(), [last_part])
    base_path = os.path.dirname(package.__file__)
    module_paths = os.listdir(base_path)
    module_paths = [x[:-3] for x in module_paths if x.endswith(".py")]
    module_paths.remove("__init__")
    for module_path in module_paths:
        try:
            _tmp = __import__(package_name, globals(), locals(), [module_path], -1)
            module = getattr(_tmp, module_path)
            res.append(module)
        except ImportError, err:
            print "Skipping %s (%s)" % (module_path, err)
            continue

    res.sort(key=operator.attrgetter("__name__"))
    return res
Sets up the output directories.
dataset/ETHPy150Open aldebaran/qibuild/python/qisys/script.py/action_modules_from_package--crossover with--dataset/ETHPy150Open linkedin/Zopkio/zopkio/test_runner_helper.py/directory_setup