A version-independent wrapper for drupal_system_listing().
350541
function systemListing($mask, $directory, $key = 'name', $min_depth = 1) {
    return drupal_system_listing($mask, $directory, $key, $min_depth);
  }
1135210
def list_pkgs(versions_as_list=False, **kwargs):
    '''
    
    '''
    versions_as_list = salt.utils.data.is_true(versions_as_list)
    # not yet implemented or not applicable
    if any([salt.utils.data.is_true(kwargs.get(x))
            for x in ('removed', 'purge_desired')]):
        return {}

    if 'pkg.list_pkgs' in __context__:
        if versions_as_list:
            return __context__['pkg.list_pkgs']
        else:
            ret = copy.deepcopy(__context__['pkg.list_pkgs'])
            __salt__['pkg_resource.stringify'](ret)
            return ret

    pkgin = _check_pkgin()
    ret = {}

    out = __salt__['cmd.run'](
        [pkgin, 'ls'] if pkgin else ['pkg_info'],
        output_loglevel='trace')

    for line in out.splitlines():
        try:
            # Some versions of pkgin check isatty unfortunately
            # this results in cases where a ' ' or ';' can be used
            pkg, ver = re.split('[; ]', line, 1)[0].rsplit('-', 1)
        except ValueError:
            continue
        __salt__['pkg_resource.add_pkg'](ret, pkg, ver)

    __salt__['pkg_resource.sort_pkglist'](ret)
    __context__['pkg.list_pkgs'] = copy.deepcopy(ret)
    if not versions_as_list:
        __salt__['pkg_resource.stringify'](ret)
    return ret
827431
def system_info(self):
        """"""
        res = self.client.service.SystemInfo()
        res = {ustr(x[0]): x[1] for x in res[0]}

        to_str = lambda arr: '.'.join([ustr(x) for x in arr[0]])
        res['OSVersion'] = to_str(res['OSVersion'])
        res['RuntimeVersion'] = to_str(res['RuntimeVersion'])
        res['Version'] = to_str(res['Version'])

        res['Name'] = ustr(res['Name'])
        res['Server'] = ustr(res['Server'])
        res['LocalNameCheck'] = ustr(res['LocalNameCheck'])
        res['UserHostAddress'] = ustr(res['UserHostAddress'])

        return res
693752
def process(self, versions):
        """"""
        for tool_name in sorted(versions.keys()):
            version = versions[tool_name]
            self._log("Using tool '%s', %s" % (tool_name, version))
325852
function processVersionLists (entity, version, versions) {
  quantum.select(entity)
    .selectAll('versionList', {recursive: true})
    .forEach(versionList => {
      versionList.content(versions.map(v => {
        return { type: 'version', params: [v], content: [] }
      }))
      versionList.add({ type: 'current', params: [version], content: [] })
    })
}
1294654
def refresh_listing():
    """"""
    for program in get_programs():
        if re.match(r'^[a-zA-Z_][a-zA-Z_0-9]*$', program) is not None:
            globals()[program] = partial(_run_program, program)

    globals()["_"] = _underscore_run_program
362897
def versions_from_archive(self):
        
        py_vers = versions_from_trove(self.classifiers)
        return [ver for ver in py_vers if ver != self.unsupported_version]
929319
def available_updates(self, obj):
        """"""
        from package_monitor import pypi
        package = pypi.Package(obj.package_name)
        versions = package.all_versions()
        return html_list([v for v in versions if v > obj.current_version])
1338307
def version(major, minor, patch):
        
        return lib.zsys_version(byref(c_int.from_param(major)), byref(c_int.from_param(minor)), byref(c_int.from_param(patch)))
1075879
def _versioned_lib_symlinks(env, libnode, version, prefix, suffix, name_func, soname_func):
    
    Verbose = False

    if Verbose:
        print("_versioned_lib_symlinks: libnode={:r}".format(libnode.get_path()))
        print("_versioned_lib_symlinks: version={:r}".format(version))

    if sys.platform.startswith('openbsd'):
        # OpenBSD uses x.y shared library versioning numbering convention
        # and doesn't use symlinks to backwards-compatible libraries
        if Verbose:
            print("_versioned_lib_symlinks: return symlinks={:r}".format(None))
        return None

    linkdir = libnode.get_dir()
    if Verbose:
        print("_versioned_lib_symlinks: linkdir={:r}".format(linkdir.get_path()))

    name = name_func(env, libnode, version, prefix, suffix)
    if Verbose:
        print("_versioned_lib_symlinks: name={:r}".format(name))

    soname = soname_func(env, libnode, version, prefix, suffix)

    link0 = env.fs.File(soname, linkdir)
    link1 = env.fs.File(name, linkdir)

    # We create direct symlinks, not daisy-chained.
    if link0 == libnode:
        # This enables SHLIBVERSION without periods (e.g. SHLIBVERSION=1)
        symlinks = [ (link1, libnode) ]
    else:
        # This handles usual SHLIBVERSION, i.e. '1.2', '1.2.3', etc.
        symlinks = [ (link0, libnode), (link1, libnode) ]

    if Verbose:
        print("_versioned_lib_symlinks: return symlinks={:r}".format(SCons.Tool.StringizeLibSymlinks(symlinks)))

    return symlinks
1270508
def list_semod():
    '''
    
    '''
    helptext = __salt__['cmd.run']('semodule -h').splitlines()
    semodule_version = ''
    for line in helptext:
        if line.strip().startswith('full'):
            semodule_version = 'new'

    if semodule_version == 'new':
        mdata = __salt__['cmd.run']('semodule -lfull').splitlines()
        ret = {}
        for line in mdata:
            if not line.strip():
                continue
            comps = line.split()
            if len(comps) == 4:
                ret[comps[1]] = {'Enabled': False,
                                 'Version': None}
            else:
                ret[comps[1]] = {'Enabled': True,
                                 'Version': None}
    else:
        mdata = __salt__['cmd.run']('semodule -l').splitlines()
        ret = {}
        for line in mdata:
            if not line.strip():
                continue
            comps = line.split()
            if len(comps) == 3:
                ret[comps[0]] = {'Enabled': False,
                                 'Version': comps[1]}
            else:
                ret[comps[0]] = {'Enabled': True,
                                 'Version': comps[1]}
    return ret
1127785
def symlink_list(load):
    '''
    
    '''
    if 'env' in load:
        # "env" is not supported; Use "saltenv".
        load.pop('env')

    ret = {}
    if load['saltenv'] not in __opts__['file_roots'] and '__env__' not in __opts__['file_roots']:
        return ret

    if 'prefix' in load:
        prefix = load['prefix'].strip('/')
    else:
        prefix = ''

    symlinks = _file_lists(load, 'links')
    return dict([(key, val)
                 for key, val in six.iteritems(symlinks)
                 if key.startswith(prefix)])
745610
def get_version_info():
    """"""
    version_info = {}
    with open(os.path.join("refcycle", "version.py"), 'r') as f:
        version_code = compile(f.read(), "version.py", 'exec')
        exec(version_code, version_info)
    return version_info
1192287
def index():
    """"""
    kwdb = current_app.kwdb

    libraries = get_collections(kwdb, libtype="library")
    resource_files = get_collections(kwdb, libtype="resource")

    return flask.render_template("libraryNames.html",
                                 data={"libraries": libraries,
                                       "version": __version__,
                                       "resource_files": resource_files
                                   })
685989
def get_system_by_name(self, name):
        """"""

        for elem in self.systems:
            if elem.name == name:
                return elem
        return None
677798
def show
      @script_listings = Script::Listing.friendly.find(params[:id])
      @versions = Phcscriptcdn::ListingVersions.where(item_id: params[:id], item_type: 'Phcscriptcdn::Script::Listing')
    end
1272602
def listVersionHistory(store):
    
    q = store.query(SystemVersion, sort=SystemVersion.creation.descending)
    return [sv.longWindedRepr() for sv in q]