Print the help message to +stream+.
173092
def educate stream=$stdout
    width # hack: calculate it now; otherwise we have to be careful not to
          # call this unless the cursor's at the beginning of a line.
    left = {}
    cols = {}
    @specs.each do |name, spec|

      s_type = case spec[:type]
        when :flag; ""
        when :int; " <i>"
        when :ints; " <i+>"
        when :string; " <s>"
        when :strings; " <s+>"
        when :float; " <f>"
        when :floats; " <f+>"
        when :io; " <filename/uri>"
        when :ios; " <filename/uri+>"
        when :date; " <date>"
        when :dates; " <date+>"
      end

      cols[name] = [
        (spec[:short] && spec[:short] != :none ? "-#{spec[:short]}" : ""),
        (spec[:type] == :flag && spec[:default] ? "--#{spec[:long]}; --no-#{spec[:long]}" : "--#{spec[:long]}"),
        (spec[:ex] ? "[#{spec[:ex]}]" : ""),
        s_type
      ]
    end

    widths = (0..3).map {|index|
      cols.max_by{|x| x[1][index].length }[1][index].length
    }
    

    unless @order.size > 0 && @order.first.first == :text
      stream.puts "#@version\n" if @version
      stream.puts "Options:"
    end

    @order.each do |what, opt|
      if what == :text
        stream.puts wrap(opt)
        next
      end

      spec = @specs[opt]
      stream.printf "    %-#{widths[0]+2}s %-#{widths[1]+2}s %#{widths[2]+2}s -  ", *cols[opt]
      desc = spec[:desc] + begin
        default_s = case spec[:default]
        when $stdout; "<stdout>"
        when $stdin; "<stdin>"
        when $stderr; "<stderr>"
        when Array
          spec[:default].join(", ")
        else
          spec[:default].to_s
        end

        if spec[:default]
          if spec[:desc] =~ /\.$/
            " (Default: #{default_s})"
          else
            " (default: #{default_s})"
          end
        else
          ""
        end
      end
      stream.puts wrap(desc)
    end
  end
139904
def cprint(msg, *args, **kw):
    # type: (str, *Any, **Any) -> None
    
    if len(args) or len(kw):
        msg = msg.format(*args, **kw)

    print(fmt('{}<0>'.format(msg)))
1257020
def print_help(filename, table, dest=sys.stdout):
    
    cmds = '|'.join(sorted(table.keys()))
    print >> dest, "Syntax: %s %s [args]" % (path.basename(filename), cmds)
645085
public static void executeHelp(String[] args, PrintStream stream) throws IOException {
        String subCmd = (args.length > 0) ? args[0] : "";
        if(subCmd.equals("list")) {
            SubCommandAsyncJobList.printHelp(stream);
        } else if(subCmd.equals("stop")) {
            SubCommandAsyncJobStop.printHelp(stream);
        } else {
            printHelp(stream);
        }
    }
110093
public void print(PrintStream ps, String message){
        if(SUPPORTED)
            ps.print(start);
        ps.print(message);
        if(SUPPORTED)
            ps.print(END);
    }
323323
def help(self, stream):
        """"""
        if stream not in self.streams:
            log.error("Stream '{}' not found in the database.".format(stream))
        params = self._stream_df[self._stream_df['STREAM'] == stream].values[0]
        self._print_stream_parameters(params)
151225
def emit_message(self, lines):
        

        for line in lines:
            print(line, file=sys.stderr)
464461
def _logger_stream(self):
        """"""
        sh = logging.StreamHandler()
        sh.set_name('sh')
        sh.setLevel(logging.INFO)
        sh.setFormatter(self._logger_formatter)
        self.log.addHandler(sh)
1119012
def help(self, message, plugin=None):
        """"""
        # help_data = self.load("help_files")
        selected_modules = help_modules = self.load("help_modules")

        self.say("Sure thing, %s." % message.sender.handle)

        help_text = "Here's what I know how to do:"
        if plugin and plugin in help_modules:
            help_text = "Here's what I know how to do about %s:" % plugin
            selected_modules = dict()
            selected_modules[plugin] = help_modules[plugin]

        for k in sorted(selected_modules, key=lambda x: x[0]):
            help_data = selected_modules[k]
            if help_data:
                help_text += "<br/><br/><b>%s</b>:" % k
                for line in help_data:
                    if line:
                        if ":" in line:
                            line = "&nbsp; <b>%s</b>%s" % (line[:line.find(":")], line[line.find(":"):])
                        help_text += "<br/> %s" % line

        self.say(help_text, html=True)
375139
def _show(self, message, indent=0, enable_verbose=True):  # pragma: no cover
        
        if enable_verbose:
            print("    " * indent + message)
745350
def _maybe_handle_help(self):
    """"""
    if self._options.help_request:
      help_printer = HelpPrinter(self._options)
      result = help_printer.print_help()
      self._exiter(result)
110447
private function printHelp()
    {
        $this->writeLn("Usage: pho [options] [files]\n");
        $this->writeLn("Options\n");

        // Loop over availableOptions, building the necessary input for
        // ConsoleFormatter::alignText()
        $options = [];
        foreach ($this->availableOptions as $name => $optionInfo) {
            $row = [$optionInfo[1], $optionInfo[0]];
            $row[] = (isset($optionInfo[3])) ? "<{$optionInfo[3]}>" : '';
            $row[] = $optionInfo[2];

            $options[] = $row;
        }

        $pad = str_repeat(' ', 3);
        foreach ($this->formatter->alignText($options, $pad) as $line) {
            $this->writeLn($pad . $line);
        }
    }
62106
def cprint(color, prefix, message):
        
        message = message or ""
        prefix = prefix or ""
        print((Console.theme[color] +
               prefix +
               message +
               Console.theme['ENDC']))
377973
def print_callback(msg):
    """"""
    json.dump(msg, stdout)
    stdout.write('\n')
    stdout.flush()
806258
def print_usage (msg, exit_code=2):
    """"""
    program = sys.argv[0]
    print(_("Error: %(msg)s") % {"msg": msg}, file=console.stderr)
    print(_("Execute '%(program)s -h' for help") % {"program": program}, file=console.stderr)
    sys.exit(exit_code)
460771
def handle_output(self, workunit, label, stream):
    """"""

    self._root_id_to_workunit_stack[str(workunit.root().id)][-1]['outputs'][label] += stream
837521
def show_help(self):
        """"""
        print("Sorry, not well understood.")
        print("- use", str(self.yes_input), "to answer 'YES'")
        print("- use", str(self.no_input), "to answer 'NO'")