def load_eggs(entry_point_name):
def _load_eggs():<EOL><INDENT>distributions, errors = working_set.find_plugins(Environment())<EOL>for dist in distributions:<EOL><INDENT>if dist not in working_set:<EOL><INDENT>LOGGER.debug('<STR_LIT>', dist, dist.location)<EOL>working_set.add(dist)<EOL><DEDENT><DEDENT>def _log_error(item, err):<EOL><INDENT>if isinstance(err, DistributionNotFound):<EOL><INDENT>LOGGER.debug('<STR_LIT>', item, err)<EOL><DEDENT>elif isinstance(err, VersionConflict):<EOL><INDENT>LOGGER.error('<STR_LIT>', item, err)<EOL><DEDENT>elif isinstance(err, UnknownExtra):<EOL><INDENT>LOGGER.error('<STR_LIT>', item, err)<EOL><DEDENT>else:<EOL><INDENT>LOGGER.error('<STR_LIT>', item, err)<EOL><DEDENT><DEDENT>for dist, err in errors.items():<EOL><INDENT>_log_error(dist, err)<EOL><DEDENT>for entry in sorted(<EOL>working_set.iter_entry_points(entry_point_name),<EOL>key=lambda entry: entry.name,<EOL>):<EOL><INDENT>try:<EOL><INDENT>entry.load(require=True)<EOL><DEDENT>except Exception as exc:  <EOL><INDENT>_log_error(entry, exc)<EOL><DEDENT><DEDENT><DEDENT>return _load_eggs<EOL>
Loader that loads any eggs in `sys.path`.