def create_terminal_writer(config, *args, **kwargs):
 tw = py.io.TerminalWriter(*args, **kwargs)
 if (config.option.color == 'yes'):
  tw.hasmarkup = True
 if (config.option.color == 'no'):
  tw.hasmarkup = False
 return tw

def create_terminal_writer ( config , * args , ** kwargs ) : tw = py . io . TerminalWriter ( * args , ** kwargs ) if ( config . option . color == 'yes' ) : tw . hasmarkup = True if ( config . option . color == 'no' ) : tw . hasmarkup = False return tw
create a terminalwriter instance configured according to the options in the config object .