def render_pages(tasks, dest, opts, notification=(lambda x, y: x)):
 (failures, pages) = ([], [])
 for (num, path) in tasks:
  try:
   pages.extend(PageProcessor(path, dest, opts, num))
   msg = (_('Rendered %s') % path)
  except:
   failures.append(path)
   msg = (_('Failed %s') % path)
   if opts.verbose:
    msg += ('\n' + traceback.format_exc())
  prints(msg)
  notification(0.5, msg)
 return (pages, failures)

def render_pages ( tasks , dest , opts , notification = ( lambda x , y : x ) ) : ( failures , pages ) = ( [ ] , [ ] ) for ( num , path ) in tasks : try : pages . extend ( PageProcessor ( path , dest , opts , num ) ) msg = ( _ ( 'Rendered %s' ) % path ) except : failures . append ( path ) msg = ( _ ( 'Failed %s' ) % path ) if opts . verbose : msg += ( '\n' + traceback . format_exc ( ) ) prints ( msg ) notification ( 0.5 , msg ) return ( pages , failures )
entry point for the job server .