r"""Print object(s) supplied via positional arguments. This function has an identical signature to the built-in print. For more advanced features, see the :class:`~rich.console.Console` class. Args: sep (str, optional): Separator between printed objects. Defaults to " ".
(
*objects: Any,
sep: str = " ",
end: str = "\n",
file: Optional[IO[str]] = None,
flush: bool = False,
)
| 51 | |
| 52 | |
| 53 | def print( |
| 54 | *objects: Any, |
| 55 | sep: str = " ", |
| 56 | end: str = "\n", |
| 57 | file: Optional[IO[str]] = None, |
| 58 | flush: bool = False, |
| 59 | ) -> None: |
| 60 | r"""Print object(s) supplied via positional arguments. |
| 61 | This function has an identical signature to the built-in print. |
| 62 | For more advanced features, see the :class:`~rich.console.Console` class. |
| 63 | |
| 64 | Args: |
| 65 | sep (str, optional): Separator between printed objects. Defaults to " ". |
| 66 | end (str, optional): Character to write at end of output. Defaults to "\\n". |
| 67 | file (IO[str], optional): File to write to, or None for stdout. Defaults to None. |
| 68 | flush (bool, optional): Has no effect as Rich always flushes output. Defaults to False. |
| 69 | |
| 70 | """ |
| 71 | from .console import Console |
| 72 | |
| 73 | write_console = get_console() if file is None else Console(file=file) |
| 74 | return write_console.print(*objects, sep=sep, end=end) |
| 75 | |
| 76 | |
| 77 | def print_json( |
no test coverage detected