MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / perror

Method perror

cmd2/cmd2.py:1549–1581  ·  view source on GitHub ↗

Print objects to sys.stderr. :param style: optional style to apply to output. Defaults to Cmd2Style.ERROR. For details on the other parameters, refer to the `print_to` method documentation.

(
        self,
        *objects: Any,
        sep: str = " ",
        end: str = "\n",
        style: StyleType | None = Cmd2Style.ERROR,
        soft_wrap: bool = True,
        justify: JustifyMethod | None = None,
        emoji: bool = False,
        markup: bool = False,
        highlight: bool = False,
        rich_print_kwargs: Mapping[str, Any] | None = None,
        **kwargs: Any,  # noqa: ARG002
    )

Source from the content-addressed store, hash-verified

1547 )
1548
1549 def perror(
1550 self,
1551 *objects: Any,
1552 sep: str = " ",
1553 end: str = "\n",
1554 style: StyleType | None = Cmd2Style.ERROR,
1555 soft_wrap: bool = True,
1556 justify: JustifyMethod | None = None,
1557 emoji: bool = False,
1558 markup: bool = False,
1559 highlight: bool = False,
1560 rich_print_kwargs: Mapping[str, Any] | None = None,
1561 **kwargs: Any, # noqa: ARG002
1562 ) -> None:
1563 """Print objects to sys.stderr.
1564
1565 :param style: optional style to apply to output. Defaults to Cmd2Style.ERROR.
1566
1567 For details on the other parameters, refer to the `print_to` method documentation.
1568 """
1569 self.print_to(
1570 sys.stderr,
1571 *objects,
1572 sep=sep,
1573 end=end,
1574 style=style,
1575 soft_wrap=soft_wrap,
1576 justify=justify,
1577 emoji=emoji,
1578 markup=markup,
1579 highlight=highlight,
1580 rich_print_kwargs=rich_print_kwargs,
1581 )
1582
1583 def psuccess(
1584 self,

Callers 15

pwarningMethod · 0.95
pfeedbackMethod · 0.95
onecmd_plus_hooksMethod · 0.95
runcmds_plus_hooksMethod · 0.95
defaultMethod · 0.95
_alias_createMethod · 0.95
_alias_deleteMethod · 0.95
_alias_listMethod · 0.95
_macro_createMethod · 0.95
_macro_deleteMethod · 0.95
_macro_listMethod · 0.95

Calls 1

print_toMethod · 0.95

Tested by 5

test_perror_styleFunction · 0.64
test_perror_no_styleFunction · 0.64
do_exitMethod · 0.64
do_echoMethod · 0.64
do_echo_errorMethod · 0.64