在IPython中默认启用美化打印

8 投票
1 回答
9471 浏览
提问于 2025-04-17 16:25

我想知道怎么在IPython中默认开启漂亮打印(pretty printing)。我到处找都没找到清楚的说明,真是头疼。谢谢大家!

1 个回答

5
$ ipython help notebook | grep pprint -A1
--pprint
    Enable auto pretty printing of results.
--
--no-pprint
    Disable auto auto pretty printing of results.


$ ipython help console | grep pprint -A1
--pprint
    Enable auto pretty printing of results.
--
--no-pprint
    Disable auto auto pretty printing of results.

当然可以!请把你想要翻译的内容发给我,我会帮你把它变得更简单易懂。

撰写回答