def show_packages():
 logger.info('These packages are available:')
 for this_package in packages_sources.values():
  if (this_package.name in installed_packages_list):
   state = ('u' if (installed_packages_list[this_package.name].timestamp < this_package.timestamp) else 'i')
  else:
   state = '-'
  package_time = time.strftime('%a, %d %b %Y %H:%M:%S', time.gmtime(this_package.timestamp))
  logger.info('{0} {1:<20} {2:<8} {3:<30} {4}'.format(state, this_package.name, this_package.readable_size, package_time, this_package.source))

def show_packages ( ) : logger . info ( 'These packages are available:' ) for this_package in packages_sources . values ( ) : if ( this_package . name in installed_packages_list ) : state = ( 'u' if ( installed_packages_list [ this_package . name ] . timestamp < this_package . timestamp ) else 'i' ) else : state = '-' package_time = time . strftime ( '%a, %d %b %Y %H:%M:%S' , time . gmtime ( this_package . timestamp ) ) logger . info ( '{0} {1:<20} {2:<8} {3:<30} {4}' . format ( state , this_package . name , this_package . readable_size , package_time , this_package . source ) )
list all available packages .