def build_available_package_names_list(self):
        def is_vistrails_package(path):
            if os.path.isfile(path):
                return (path.endswith('.py') and
                        not path.endswith('__init__.py'))
            elif os.path.isdir(path):
                return os.path.isfile(os.path.join(path, '__init__.py'))
            return False

        def search(dirname, prefix):
            for name in os.listdir(dirname):
                if is_vistrails_package(os.path.join(dirname, name)):
                    if name.endswith('.py'):
                        name = name[:-3]
                    self.get_available_package(name, prefix=prefix)

        # Finds standard packages
        packages = self.import_packages_module()
        # This makes VisTrails not zip-safe
        search(os.path.dirname(packages.__file__),
               prefix='vistrails.packages.')

        # Finds user packages
        userpackages = self.import_user_packages_module()
        if userpackages is not None:
            search(os.path.dirname(userpackages.__file__),
                   prefix='userpackages.')

        # Finds plugin packages
        try:
            from pkg_resources import iter_entry_points
        except __HOLE__:
            pass
        else:
            for entry_point in iter_entry_points('vistrails.packages'):
                # Reads module name and turns it into prefix and codepath
                name = entry_point.module_name.rsplit('.', 1)
                if len(name) > 1:
                    prefix, name = name
                    prefix = '%s.' % prefix
                else:
                    prefix = ''
                    name, = name

                # Create the Package, with the right prefix
                self.get_available_package(name, prefix=prefix)

        return self._available_packages.keys()
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/core/packagemanager.py/PackageManager.build_available_package_names_list