Print to the given string, the documentation for the events
    and the associated handlers.
17250
def autodoc_event_handlers(stream=sys.stdout):
    
    lines = []
    for cls in all_subclasses(EventHandler):
        if cls in _ABC_EVHANDLER_CLASSES: continue
        event_class = cls.event_class
        lines.extend(cls.cls2str().split("\n"))

        # Here we enforce the abstract protocol of the class
        # The unit test in tests_events will detect the problem.
        if not hasattr(cls, "can_change_physics"):
            raise RuntimeError("%s: can_change_physics must be defined" % cls)

    stream.write("\n".join(lines) + "\n")
691984
def pprint(string, token=[WORD, POS, CHUNK, PNP], column=4):
    
    if isinstance(string, basestring):
        print("\n\n".join([table(sentence, fill=column) for sentence in Text(string, token)]))
    if isinstance(string, Text):
        print("\n\n".join([table(sentence, fill=column) for sentence in string]))
    if isinstance(string, Sentence):
        print(table(string, fill=column))
537533
private void print( Queue<Runnable> queue, IoEvent event) {
        StringBuilder sb = new StringBuilder();
        sb.append( "Adding event " ).append( event.getType() ).append( " to session " ).append(event.getSession().getId() );
        boolean first = true;
        sb.append( "\nQueue : [" );
        for (Runnable elem:queue) {
            if ( first ) {
                first = false;
            } else {
                sb.append( ", " );
            }
                
            sb.append(((IoEvent)elem).getType()).append(", ");
        }
        sb.append( "]\n" );
        LOGGER.debug( sb.toString() );
    }
1211767
def dump(self, **kwargs):
        import sys
        ''''''
        if not self.seq:
            self.seq = self.getSequence()
        print("StringGenerator version: %s" % (__version__))
        print("Python version: %s" % sys.version)
        # this doesn't work anymore in p3
        # print("Random method provider class: %s" % randint.im_class.__name__)
        self.seq.dump()
        return self.render(**kwargs)
351164
def report(self, string='', level=0, prelude='', progress=False, abbreviate=True):
        ''''''
        if self._mute == False:
            self._prefix = prelude + '{spacing}[{name}] '.format(name = self.nametag, spacing = ' '*level)
            self._prefix = "{0:>16}".format(self._prefix)
            equalspaces = ' '*len(self._prefix)
            toprint = string + ''
            if abbreviate:
                if shortcuts is not None:
                    for k in shortcuts.keys():
                        toprint = toprint.replace(k, shortcuts[k])

            if progress:
                print('\r' + self._prefix + toprint.replace('\n', '\n' + equalspaces),)
            else:
                print(self._prefix + toprint.replace('\n', '\n' + equalspaces))
1040988
public static void print(PrintWriter self, Object value) {
        self.print(InvokerHelper.toString(value));
    }
451701
function print() {
    getLoggers().forEach(function (logger) {
        consoleAppender.log(formatText('Logger %b: %b, parent:%b', logger.name, logger.level, logger.parent));
    });
}
68906
def show_event_handlers(self, stream=sys.stdout, verbose=0):
        """"""
        lines = ["List of event handlers installed:"]
        for handler in self.event_handlers:
            if verbose:
                lines.extend(handler.__class__.cls2str().split("\n"))
            else:
                lines.extend(str(handler).split("\n"))

        stream.write("\n".join(lines))
        stream.write("\n")
775353
def print_string(s)
      s = s.to_s.dup
      until s.empty?
        if s.sub!(/([^\e]*)?\e([\[\(])([0-9\;\=]*)([a-zA-Z@])(.*)/, '\5')
          @out.write(concealed(Regexp.last_match(1)))
          if Regexp.last_match(2) == '[' && Regexp.last_match(4) == 'm'
            attrs = Regexp.last_match(3).split(';')
            attrs.push(nil) unless attrs
            attrs.each do |attr|
              atv = attr.to_i
              case atv
              when 0
                reset_colors
              when 1
                @bold = true
              when 21
                @bold = false
              when 4
                @underline = true
              when 24
                @underline = false
              when 7
                @revideo = true
              when 27
                @revideo = false
              when 8
                @concealed = true
              when 28
                @concealed = false
              when 30..37
                @foreground = ANSI2WIN[atv - 30]
              when 39
                @foreground = @default_foreground
              when 40..47
                @background = ANSI2WIN[atv - 40]
              when 49
                @background = @default_background
              end
            end

            attrib = @revideo ? (@background | (@foreground << 4)) : (@foreground | (@background << 4))
            attrib |= 0x08 if @bold
            attrib |= 0x400 if @underline

            WinColors.SetConsoleTextAttribute(@handle, attrib)
          end
        else
          @out.write(concealed(s))
          s = ''
        end
      end
    end
548338
def log(message, severity="INFO", print_debug=True):
    

    print_me = ['WARNING', 'INFO', 'DEBUG']
    if severity in print_me:
        if severity == 'DEBUG':
            if print_debug:
                print("{0}: {1}".format(severity, message))
        else:
            print("{0}: {1}".format(severity, message))
    else:
        raise Exception("{0}: {1}".format(severity, message))
565073
def process_strings(self, string, docstrings=False):
        """"""

        m = RE_STRING_TYPE.match(string)
        stype = self.get_string_type(m.group(1) if m.group(1) else '')
        if not self.match_string(stype) and not docstrings:
            return '', False
        is_bytes = 'b' in stype
        is_raw = 'r' in stype
        is_format = 'f' in stype
        content = m.group(3)
        if is_raw and (not is_format or not self.decode_escapes):
            string = self.norm_nl(content)
        elif is_raw and is_format:
            string = self.norm_nl(FE_RFESC.sub(self.replace_unicode, content))
        elif is_bytes:
            string = self.norm_nl(RE_BESC.sub(self.replace_bytes, content))
        elif is_format:
            string = self.norm_nl(RE_FESC.sub(self.replace_unicode, content))
        else:
            string = self.norm_nl(RE_ESC.sub(self.replace_unicode, content))

        return textwrap.dedent(RE_NON_PRINTABLE.sub('\n', string) if is_bytes else string), is_bytes
74251
public static String printToString(Message message) {
        try {
            StringBuilder text = new StringBuilder();
            print(message, text);
            return text.toString();
        } catch (IOException e) {
            throw new RuntimeException("Writing to a StringBuilder threw an IOException (should never "
                                                       + "happen).",
                                       e);
        }
    }
372789
def print_str(text, config={})
      win = config.fetch(:window, @window) # assuming its in App
      x = config.fetch :x, 0 # @message_row # Ncurses.LINES-1, 0 since one line window 2011-10-8 
      y = config.fetch :y, 0
      $log.debug "XXX: print_str #{win} with text : #{text} at #{x}  #{y} "
      color = config[:color_pair] || $datacolor
      raise "no window for ask print in #{self.class} name: #{name} " unless win
      color=Ncurses.COLOR_PAIR(color);
      win.attron(color);
      #win.mvprintw(x, y, "%-40s" % text);
      win.mvprintw(x, y, "%s" % text);
      win.attroff(color);
      win.refresh # FFI NW 2011-09-9  , added back gets overwritten
    end
20287
def printSequence(x, formatString="%d"):
  
  numElements = len(x)
  s = ""
  for j in range(numElements):
    s += formatString % x[j]
  print s
956524
def safe_print(ustring, errors='replace', **kwargs):
    
    encoding = sys.stdout.encoding or 'utf-8'
    if sys.version_info[0] == 3:
        print(ustring, **kwargs)
    else:
        bytestr = ustring.encode(encoding, errors=errors)
        print(bytestr, **kwargs)
770188
public void println() {
        if (ivSuppress == true)
            return;
        String writeData = null;
        LogRecord sse = null;

        // Add data to cache, then forward on to logging subsystem. Must not
        // hold the object synchronizer on the dispatch.
        {
            sse = getTraceData(writeData);
            dispatchEvent(sse);
        }

        // // Write the data to the PrintStream this stream is wrapping.
        // if (ivFormatted == false)
        // ivStream.println();
        // else {
        // // Write data in formatted form. If a write is pending a header has
        // // already been written.
        // // Otherwise new up an event and write it, which also writes the
        // // header.
        // synchronized (this) {
        // if (ivWritePending)
        // ivStream.println();
        // else {
        // sse = createEvent(writeData);
        // sse.writeSelfToStream(ivStream, ivFormatType, true, ivBuffer,
        // ivFormatter, ivDate, ivFieldPos);
        // }
        // ivWritePending = false;
        // }
        // }
    }
274725
def pprint(j, no_pretty):
    
    if not no_pretty:
        click.echo(
            json.dumps(j, cls=PotionJSONEncoder, sort_keys=True, indent=4, separators=(",", ": "))
        )
    else:
        click.echo(j)