def get_minimal_syspath(self, absolute_paths=True):
        """
        Provide a list of directories that, when added to sys.path, would enable
        any of the discovered python modules to be found
        """
        # firstly, gather a list of the minimum path to each package
        package_list = set()
        packages = [p[0] for p in self._packages if not p[1]]
        for package in sorted(packages, key=len):
            parent = os.path.split(package)[0]
            if parent not in packages and parent not in package_list:
                package_list.add(parent)

        # now add the directory containing any modules who are not in packages
        module_list = []
        modules = [m[0] for m in self._modules if not m[1]]
        for module in modules:
            dirname = os.path.dirname(module)
            if dirname not in packages:
                module_list.append(dirname)

        full_list = sorted(set(module_list) | package_list | {self.rootpath}, key=len)
        if absolute_paths:
            full_list = [os.path.join(self.rootpath, p).rstrip(os.path.sep) for p in full_list]
        return full_list
def get_minimal_syspath ( self , absolute_paths = True ) : package_list = set ( ) packages = [ p [ 0 ] for p in self . _packages if not p [ 1 ] ] for package in sorted ( packages , key = len ) : parent = os . path . split ( package ) [ 0 ] if parent not in packages and parent not in package_list : package_list . add ( parent ) module_list = [ ] modules = [ m [ 0 ] for m in self . _modules if not m [ 1 ] ] for module in modules : dirname = os . path . dirname ( module ) if dirname not in packages : module_list . append ( dirname ) full_list = sorted ( set ( module_list ) | package_list | { self . rootpath } , key = len ) if absolute_paths : full_list = [ os . path . join ( self . rootpath , p ) . rstrip ( os . path . sep ) for p in full_list ] return full_list
Provide a list of directories that, when added to sys.path, would enable
        any of the discovered python modules to be found