Use one of the functions below for printing, not this one.
421612
def print_with_header(header, message, color, indent=0):
    
    print()
    padding = ' ' * indent
    print(padding + color + BOLD + header + ENDC + color + message + ENDC)
1195273
def pprint(self, ind):
        """"""
        pp = pprint.PrettyPrinter(indent=ind)
        pp.pprint(self.tree)
136293
def fake_print(self):
    '''
    
    '''
    def _fake_run():
        kwargs = self.kwargs.copy()
        kwargs['generate'] = True
        return _fake_handle_result(
            getattr(self.migrator, self.method)(*self.args, **kwargs)
        )

    def _fake_handle_result(result):
        if isinstance(result, Node):
            sql, params = self._parse_node(result)
            return (sql, params)
        elif isinstance(result, Operation):
            return str(result)
        elif isinstance(result, (list, tuple)):
            return '\n'.join([str(_fake_handle_result(item)) for item in result])

    return str(_fake_run())
735250
def print(self, txt: str, hold: bool=False) -> None:
        
        if hold:
            self.held_prints[self.trace_depth] = txt
        elif self.held_prints[self.trace_depth]:
            if self.max_print_depth > self.trace_depth:
                print(self.held_prints[self.trace_depth])
                print(txt)
                self.max_print_depth = self.trace_depth
            del self.held_prints[self.trace_depth]
        else:
            print(txt)
            self.max_print_depth = self.trace_depth
745604
def get_printer(name, color=None, ansi_code=None, force_color=False):
    """"""

    if force_color or supports_color():
        if color is None and ansi_code is None:
            cpre_1, csuf_1 = hash_coloured_escapes(name)
            cpre_2, csuf_2 = hash_coloured_escapes(name + 'salt')
            name = cpre_1 + '+' + cpre_2 + '+' + csuf_1 + ' ' + name
        else:
            name = colored(name, color=color, ansi_code=ansi_code)

    prefix = name + ': '

    def printer(text):
        print(prefix + str(text))

    return printer
334948
def cmd_print(self):
        """"""
        if not self._valid_lines:
            return ''
        return '\n'.join([line.raw_line for line in self._valid_lines]) + '\n'
380792
def mdprint(*values, plain=None, **options):
    
    print(*[mdrender(x, plain=plain) for x in values], **options)
1076272
def print(cls, *args, **kwargs):
        """"""
        # pylint: disable=protected-access
        with _shared._PRINT_LOCK:
            print(*args, **kwargs)
            _sys.stdout.flush()
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)
761074
def Print(self, x, data, message, **kwargs):  # pylint: disable=invalid-name
    
    del data, message, kwargs
    tf.logging.warning("Warning - mtf.Print not implemented for this mesh type")
    return x
432133
def pretty_print(self, warnings=False):
        
        msg = []
        if (warnings) and (len(self.warnings) > 0):
            msg.append(u"Warnings:")
            for warning in self.warnings:
                msg.append(u"  %s" % warning)
        if len(self.errors) > 0:
            msg.append(u"Errors:")
            for error in self.errors:
                msg.append(u"  %s" % error)
        return u"\n".join(msg)
848931
def cprint(text, color=None, on_color=None, attrs=None, **kwargs):
    

    print((colored(text, color, on_color, attrs)), **kwargs)
1289939
def emptyPrinter(self, expr):
        """"""
        indent_str = "    " * (self._print_level - 1)
        lines = []
        if isinstance(expr.__class__, Singleton):
            # We exploit that Singletons override __expr__ to directly return
            # their name
            return indent_str + repr(expr)
        if isinstance(expr, Expression):
            args = expr.args
            keys = expr.minimal_kwargs.keys()
            lines.append(indent_str + expr.__class__.__name__ + "(")
            for arg in args:
                lines.append(self.doprint(arg) + ",")
            for key in keys:
                arg = expr.kwargs[key]
                lines.append(
                    ("    " * self._print_level) + key + '=' +
                    self.doprint(arg).lstrip() + ",")
            if len(args) > 0 or len(keys) > 0:
                lines[-1] = lines[-1][:-1]  # drop trailing comma for last arg
            lines[-1] += ")"
        elif isinstance(expr, (tuple, list)):
            delims = ("(", ")") if isinstance(expr, tuple) else ("[", "]")
            if len(expr) == 1:
                delims = (delims[0], "," + delims[1])
            lines.append(
                indent_str + delims[0] +
                ", ".join([render_head_repr(v) for v in expr]) +
                delims[1])
        else:
            lines.append(indent_str + SympyReprPrinter().doprint(expr))
        return "\n".join(lines)
999518
def _print_function(self, f, prefix, fullname, func):
    """"""
    heading = prefix + " `" + fullname
    if not isinstance(func, property):
      heading += self._generate_signature_for_function(func)
    heading += "` {#%s}" % _get_anchor(self._module_to_name, fullname)
    print(heading, file=f)
    print("", file=f)
    self._print_formatted_docstring(inspect.getdoc(func), f)
    print("", file=f)
1362192
def print(*a):
    
    try:
        _print(*a)
        return a[0] if len(a) == 1 else a
    except:
        _print(*a)
117957
protected void doPrint() {

        PrintablePage pageInView = previewPane.getPrintablePage();
        PrintablePage pageToPrint = new PrintablePage();

        try {
            pageInView.bindPage(pageToPrint);

            Printer printer = Printer.getDefaultPrinter();

            if (printer == null || settingsView.getPaperView()
                    .getAvailablePapers().isEmpty()) {
                // Show an Error
                Alert alert = new Alert(AlertType.INFORMATION);
                alert.initOwner(dialog);
                alert.setTitle(Messages
                        .getString("DateControl.TITLE_CALENDAR_PROBLEM"));
                alert.setHeaderText(
                        Messages.getString("PrintView.NO_PRINTERS"));
                alert.setContentText(
                        Messages.getString("PrintView.ERROR_NO_PRINTER"));
                alert.show();
                return;
            }

            hide();
            LoggingDomain.PRINTING.fine("printer = " + printer);

            PageLayout layout = null;

            final Paper paper = pageInView.getPaper();
            final PageOrientation pageOrientation = pageInView.getViewType()
                    .getPageOrientation();
            final PaperView.MarginType marginType = pageInView.getMarginType();

            LoggingDomain.PRINTING.fine("paper = " + paper);
            LoggingDomain.PRINTING.fine("pageOrientation = " + pageOrientation);
            LoggingDomain.PRINTING.fine("marginType = " + marginType);
            LoggingDomain.PRINTING
                    .fine("custom margins = left: " + pageInView.getLeftMargin()
                            + ", right: " + pageInView.getRightMargin()
                            + ", top: " + pageInView.getTopMargin()
                            + ", bottom: " + pageInView.getBottomMargin());

            switch (marginType) {
            case DEFAULT:
                layout = printer.createPageLayout(paper, pageOrientation,
                        Printer.MarginType.DEFAULT);
                break;
            case MINIMUM:
                layout = printer.createPageLayout(paper, pageOrientation,
                        Printer.MarginType.HARDWARE_MINIMUM);
                break;
            case CUSTOM:
                layout = printer.createPageLayout(paper, pageOrientation,
                        pageInView.getLeftMargin(), pageInView.getRightMargin(),
                        pageInView.getTopMargin(),
                        pageInView.getBottomMargin());
                break;
            }

            // sizes of print page and physical page
            double pageWidth = pageToPrint.prefWidth(-1);
            double pageHeight = pageToPrint.prefHeight(-1);

            double printableWidth = layout.getPrintableWidth();
            double printableHeight = layout.getPrintableHeight();

            // scaling
            double scaleX = printableWidth / pageWidth;
            double scaleY = printableHeight / pageHeight;
            double scale = Math.min(scaleX, scaleY);

            LoggingDomain.PRINTING.fine("pageWidth / pageHeight = " + pageWidth
                    + " / " + pageHeight);
            LoggingDomain.PRINTING.fine("printableWidth / printableHeight = "
                    + printableWidth + " / " + printableHeight);
            LoggingDomain.PRINTING
                    .fine("scaleX / scaleY = " + scaleX + " / " + scaleY);
            LoggingDomain.PRINTING.fine("scale = " + scale);

            pageToPrint.applyCss();
            pageToPrint.layout();
            pageToPrint.getTransforms().add(new Scale(scale, scale));

            // transformation = center
            final double translateX = (printableWidth - (pageWidth * scale))
                    / 2;
            final double translateY = (printableHeight - (pageHeight * scale))
                    / 2;

            LoggingDomain.PRINTING.fine("translateX / translateY = "
                    + translateX + " / " + translateY);

            pageToPrint.setTranslateX(translateX);
            pageToPrint.setTranslateY(translateY);

            PrinterJob job = PrinterJob.createPrinterJob(printer);
            JobSettings settings = job.getJobSettings();
            settings.setJobName(Messages.getString("PrintView.TITLE_LABEL"));
            settings.setPageLayout(layout);

            if (job.showPrintDialog(getScene().getWindow())) {
                do {
                    boolean success = job.printPage(pageToPrint);
                    if (!success) {
                        break;
                    }
                } while (pageToPrint.next());

                job.endJob();
            }
        } finally {
            pageInView.unbindPage(pageToPrint);
        }
    }
1255661
def printer(self):
        """"""
        i = 0
        while i < self.n + 1:
            print "--------- State No --------" + repr(i)
            self.s[i].printer()
            i = i + 1