def prompt_xontrib_install(names):
 md = xontrib_metadata()
 packages = []
 for name in names:
  for xontrib in md['xontribs']:
   if (xontrib['name'] == name):
    packages.append(xontrib['package'])
 print 'The following xontribs are enabled but not installed: \n   {xontribs}\nTo install them run \n    pip install {packages}'.format(xontribs=' '.join(names), packages=' '.join(packages))

def prompt_xontrib_install ( names ) : md = xontrib_metadata ( ) packages = [ ] for name in names : for xontrib in md [ 'xontribs' ] : if ( xontrib [ 'name' ] == name ) : packages . append ( xontrib [ 'package' ] ) print 'The following xontribs are enabled but not installed: \n   {xontribs}\nTo install them run \n    pip install {packages}' . format ( xontribs = ' ' . join ( names ) , packages = ' ' . join ( packages ) )
returns a formatted string with name of xontrib package to prompt user .