Handling the output tyoe.
 @param pType [String] Type of object
 @return Return an object of output.
7525
def get_output(pType)
      pType.downcase!

      return XMLOutputFormat.new if pType == 'xml'
      raise Error::ParserError if pType == 'yml'
    end
442779
protected Object getObject(String pType) 
    /*throws XxxException*/ {
    	// Get class
    	Class cl = getType(pType);

    	// Return the new instance (requires empty public constructor)
    	try {
    	    return cl.newInstance();
    	}
    	catch (Exception e) {
    	    // throw new XxxException(e);
    	    throw new RuntimeException(e.getMessage());
    	}
    	
    	// Can't happen
    	//return null;
    }
1171188
def print_start_trigger(self, type):
        '''
        '''
        types = {'recieved': 1,
                 'filled': 2,
                 'num_recieved': 3}
        
        if type in types:
            self.send('^PT'+chr(types[type]))
        else:
            raise RuntimeError('Invalid type.')
1057477
def output_capturing():
    """"""
    out = sys.stdout

    sys.stdout = StringIO()

    try:
        yield

    finally:
        sys.stdout = out
1190044
def printo(msg, encoding=None, errors='replace', std_type='stdout'):
    
    std = getattr(sys, std_type, sys.stdout)
    if encoding is None:
        try:
            encoding = std.encoding
        except AttributeError:
            encoding = None
    # Fallback to ascii if no encoding is found
    if encoding is None:
        encoding = 'ascii'
    # https://docs.python.org/3/library/sys.html#sys.stdout
    # write in the binary buffer directly in python3
    if hasattr(std, 'buffer'):
        std = std.buffer
    std.write(msg.encode(encoding, errors=errors))
    std.write(b'\n')
    std.flush()
797296
def _cast_output_to_type(value, typ):
    ''''''
    if typ == 'b':
        return bool(value)
    if typ == 'i':
        return int(value)
    return value
1277199
def handle_output(results, output_type, action):
    """"""
    if output_type == 'QUIET':
        return

    if not output_type == 'JSON':
        if action == 'list':
            table = generate_list_table_result(
                logger, results, output_type == 'TABLE-NO-HEADER')
        else:
            table = generate_table_results(results, output_type == 'TABLE-NO-HEADER')
        if table:
            print(table)
    else:
        try:
            json_str = json.dumps(results)
            if json_str:
                print(json_str)
        except TypeError:
            logger.debug('Output is not JSON serializable, and then cannot '
                         'be printed with --output=JSON parameter.')
230385
def set_outputs(self, *outputs):
        
        self._outputs = OrderedDict()
        for output in outputs:
            out_name = None
            type_or_serialize = None
            if isinstance((list, tuple), output):
                if len(output) == 1:
                    out_name = output[0]
                elif len(output) == 2:
                    out_name = output[0]
                    type_or_serialize = output[1]
                else:
                    raise ValueError("invalid output format")
            else:
                out_name = output
            self.add_output(out_name, type_or_serialize)
111682
def by_console(self, text_to_print):
        
        if self.show:
            sys.stdout.write("%s\n" % text_to_print)
            sys.stdout.flush()
880279
def printOut(value, end='\n'):
    
    sys.stdout.write(value)
    sys.stdout.write(end)
    sys.stdout.flush()
253405
def _get_interpretation_description_and_output_type(interpretation, dtype):
    

    type_string = dtype.__name__
    name = "%s__%s" % (interpretation, type_string)

    if not hasattr(_interpretations_class, name):
        raise ValueError("No transform available for type '%s' with interpretation '%s'."
                         % (type_string, interpretation))

    # Need unbound method to get the attributes
    func = getattr(_interpretations_class, name)

    return func.description, func.output_type
310468
def get_printout(out, opts=None, **kwargs):
    '''
    
    '''
    if opts is None:
        opts = {}

    if 'output' in opts and opts['output'] != 'highstate':
        # new --out option, but don't choke when using --out=highstate at CLI
        # See Issue #29796 for more information.
        out = opts['output']

    # Handle setting the output when --static is passed.
    if not out and opts.get('static'):
        if opts.get('output'):
            out = opts['output']
        elif opts.get('fun', '').split('.')[0] == 'state':
            # --static doesn't have an output set at this point, but if we're
            # running a state function and "out" hasn't already been set, we
            # should set the out variable to "highstate". Otherwise state runs
            # are set to "nested" below. See Issue #44556 for more information.
            out = 'highstate'

    if out == 'text':
        out = 'txt'
    elif out is None or out == '':
        out = 'nested'
    if opts.get('progress', False):
        out = 'progress'

    opts.update(kwargs)
    if 'color' not in opts:
        def is_pipe():
            '''
            Check if sys.stdout is a pipe or not
            '''
            try:
                fileno = sys.stdout.fileno()
            except (AttributeError, io.UnsupportedOperation):
                fileno = -1  # sys.stdout is StringIO or fake
            return not os.isatty(fileno)

        if opts.get('force_color', False):
            opts['color'] = True
        elif opts.get('no_color', False) or is_pipe() or salt.utils.platform.is_windows():
            opts['color'] = False
        else:
            opts['color'] = True
    else:
        if opts.get('force_color', False):
            opts['color'] = True
        elif opts.get('no_color', False) or salt.utils.platform.is_windows():
            opts['color'] = False
        else:
            pass

    outputters = salt.loader.outputters(opts)
    if out not in outputters:
        # Since the grains outputter was removed we don't need to fire this
        # error when old minions are asking for it
        if out != 'grains':
            log.error('Invalid outputter %s specified, falling back to nested', out)
        return outputters['nested']
    return outputters[out]
890798
public static void print(Object o, OutputStream outs, boolean typeheader) throws IOException {
		OutputStreamWriter w=new OutputStreamWriter(outs,"UTF-8");
		print(o,w,typeheader);
		w.flush();
	}
826297
def outputs(self_):
        
        outputs = {}
        for cls in classlist(self_.cls):
            for name in dir(cls):
                method = getattr(self_.self_or_cls, name)
                dinfo = getattr(method, '_dinfo', {})
                if 'outputs' not in dinfo:
                    continue
                for override, otype, idx in dinfo['outputs']:
                    if override is not None:
                        name = override
                    outputs[name] = (otype, method, idx)
        return outputs
1223003
function Output(options) {
  if (!(this instanceof Output))
    return new Output(options);

  this.value = 0;
  this.script = new Script();

  if (options)
    this.fromOptions(options);
}
252845
public Object toObject(final String pString, final Class pType) throws ConversionException {
        return toObject(pString, pType, null);
    }
595281
def real_out_dtype(self):
        """"""
        if self.__real_out_dtype is None:
            raise AttributeError(
                'no real variant of output dtype {} defined'
                ''.format(dtype_repr(self.scalar_out_dtype)))
        else:
            return self.__real_out_dtype