environment/lib/python2.7/site-packages/gurumate-2.8.6-py2.7.egg/gurumate/linux2/apt.py
def find(name):
    '''
        returns a list of tuples (package_name, description) for apt-cache search results
    '''
    cmd = 'apt-cache search %s' % name
    args = shlex.split(cmd)
    try:
        output = subprocess.check_output(args)
    except CalledProcessError:
        return []
    lines = output.splitlines()
    packages = []
    for line in lines:
        package, _, desc = line.partition(' - ')
        packages.append((package, desc)) 
    return packages
def find(name):
    '''
        returns a list of tuples (package_name, description) for apt-cache search results
    '''
    cmd = 'apt-cache search %s' % name
    args = shlex.split(cmd)
    try:
        output = subprocess.check_output(args)
    except CalledProcessError:
        return []
    lines = output.splitlines()
    packages = []
    for line in lines:
        package, _, desc = line.partition(' - ')
        packages.append((package, desc)) 
    return packages
def find ( name ) : cmd = 'apt-cache search %s' % name args = shlex . split ( cmd ) try : output = subprocess . check_output ( args ) except CalledProcessError : return [ ] lines = output . splitlines ( ) packages = [ ] for line in lines : package , _ , desc = line . partition ( ' - ' ) packages . append ( ( package , desc ) ) return packages
returns a list of tuples (package_name, description) for apt-cache search results
returns a list of tuples ( package_name description ) for apt - cache search results