Пример #1
0
def pages(topic):
    """ Get help pages corresponding to a given topic. """
    res = list()
    
    for path in _libpaths():
        for name in _packages(**{'all.available': True, 
                                 'lib.loc': StrSexpVector((path,))}):
            #FIXME: what if the same package is installed
            #       at different locations ?
            pack = Package(name)
            try:
                page = pack.fetch(topic)
                res.append(page)
            except HelpNotFoundError as hnfe:
                pass
            
    return tuple(res)
Пример #2
0
def pages(topic):
    """ Get help pages corresponding to a given topic. """
    res = list()

    for path in _libpaths():
        for name in _packages(**{'all.available': True,
                                 'lib.loc': StrSexpVector((path,))}):
            # TODO: what if the same package is installed
            #       at different locations ?
            pack = Package(name)
            try:
                page = pack.fetch(topic)
                res.append(page)
            except HelpNotFoundError as hnfe:
                pass

    return tuple(res)