def _add_eggs_on_path(self, path, working_set=None):
        """ Add all eggs found on the path to a working set. """

        if working_set is None:
            working_set = pkg_resources.working_set

        environment = pkg_resources.Environment(path)

        # 'find_plugins' identifies those distributions that *could* be added
        # to the working set without version conflicts or missing requirements.
        distributions, errors = working_set.find_plugins(environment)
        if len(errors) > 0:
            raise SystemError(errors % 'Cannot find eggs %s')

        # Add the distributions to the working set (this makes any Python
        # modules in the eggs available for importing).
        for distribution in distributions:
            working_set.add(distribution)

        return

#### EOF ######################################################################
dataset/ETHPy150Open enthought/envisage/envisage/tests/egg_based_test_case.py/EggBasedTestCase._add_eggs_on_path/swapped operands of `%`