parameters: (outlist, config)
docstring: Writing output to screen or file
docstring_summary: Writing output to screen or file
docstring_tokens: Writing output to screen or file
function: def finish_him(outlist, config):
  	"Writing output to screen or file"
  	outfile = config['outfile']
  	outlist = unmaskEscapeChar(outlist)
  	outlist = expandLineBreaks(outlist)
  
  	# Apply PostProc filters
  	if config['postproc']:
  		filters = compile_filters(config['postproc'],
  			_('Invalid PostProc filter regex'))
  		postoutlist = []
  		errmsg = _('Invalid PostProc filter replacement')
  		for line in outlist:
  			for rgx,repl in filters:
  				try: line = rgx.sub(repl, line)
  				except: Error("%s: '%s'"%(errmsg, repl))
  			postoutlist.append(line)
  		outlist = postoutlist[:]
  
  	if outfile == MODULEOUT:
  		return outlist
  	elif outfile == STDOUT:
  		if GUI:
  			return outlist, config
  		else:
  			for line in outlist: print(line)
  	else:
  		Savefile(outfile, addLineBreaks(outlist))
  		if not GUI and not QUIET:
  			print(_('%s wrote %s')%(my_name,outfile))
  
  	if config['split']:
  		if not QUIET: print("--- html...")
  		sgml2html = 'sgml2html -s %s -l %s %s' % (
  			config['split'], config['lang'] or lang, outfile)
  		if not QUIET: print("Running system command:", sgml2html)
  		os.system(sgml2html)
function_tokens: def finish_him ( outlist , config ) : outfile = config [ 'outfile' ] outlist = unmaskEscapeChar ( outlist ) outlist = expandLineBreaks ( outlist ) # Apply PostProc filters if config [ 'postproc' ] : filters = compile_filters ( config [ 'postproc' ] , _ ( 'Invalid PostProc filter regex' ) ) postoutlist = [ ] errmsg = _ ( 'Invalid PostProc filter replacement' ) for line in outlist : for rgx , repl in filters : try : line = rgx . sub ( repl , line ) except : Error ( "%s: '%s'" % ( errmsg , repl ) ) postoutlist . append ( line ) outlist = postoutlist [ : ] if outfile == MODULEOUT : return outlist elif outfile == STDOUT : if GUI : return outlist , config else : for line in outlist : print ( line ) else : Savefile ( outfile , addLineBreaks ( outlist ) ) if not GUI and not QUIET : print ( _ ( '%s wrote %s' ) % ( my_name , outfile ) ) if config [ 'split' ] : if not QUIET : print ( "--- html..." ) sgml2html = 'sgml2html -s %s -l %s %s' % ( config [ 'split' ] , config [ 'lang' ] or lang , outfile ) if not QUIET : print ( "Running system command:" , sgml2html ) os . system ( sgml2html )