#NEWLINE# def search_package_by_name( self , names ) : #NEWLINE# #INDENT# 'Search package name by import name.' #NEWLINE# print ( Color . BLUE ( 'Starting search names ...' ) ) #NEWLINE# ( found , not_found ) = search_names ( names , self . installed_pkgs ) #NEWLINE# for name in found : #NEWLINE# #INDENT# print ( 'Found package(s) for "{0}":' . format ( Color . GREEN ( name ) ) ) #NEWLINE# print_table ( found [ name ] , headers = [ 'PACKAGE' , 'VERSION' , 'WHERE' ] ) #NEWLINE# #UNINDENT# if not_found : #NEWLINE# #INDENT# msg = '"{0}" not found.\n' . format ( Color . RED ( ', ' . join ( self ) ) ) #NEWLINE# msg += 'Maybe you need update database.' #NEWLINE# print ( Color . YELLOW ( msg ) )