'Generate all Python import paths from a given list of dirs.
This involves handling .pth files on the given dirs. It generates
import "paths" rather than "dirs" because Python .egg files can be
returned.
Dev Notes:
- Python\'s .pth files can have *executable* Python code. This
currently is not handled (those kinds of lines are skipped).'

def _gen_python_import_paths_from_dirs(self, extra_dirs):

    for dir in extra_dirs:
        if (not exists(dir)):
            continue
        (yield dir)
        try:
            for pth_path in glob(join(dir, '*.pth')):
                for p in self._gen_python_import_paths_from_pth_path(pth_path):
                    (yield p)
        except EnvironmentError as ex:
            log.warn("error    analyzing    .pth    files    in    '%s':    %s", dir, ex)
