5
如何在IPython中默認啓用漂亮打印?我無法在任何地方找到明確的說明如何做到這一點。 非常感謝!在IPython中默認啓用漂亮打印
如何在IPython中默認啓用漂亮打印?我無法在任何地方找到明確的說明如何做到這一點。 非常感謝!在IPython中默認啓用漂亮打印
$ 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.
它在ubuntu默認啓用。你在用什麼? – 2013-02-19 22:25:30
這[論壇主題](http://grokbase.com/t/scipy.org/ipython-user/12b9kbt2kv/pretty-print-as-default-print-function)與您具有相同的問題。我會查出來的! – xxmbabanexx 2013-02-19 22:34:40
你只是想讓IPython中的'Out [123]:'行做'pprint.pprint(_)'而不是'print(repr(_))',或者是否想要將每個調用都綁定到而不是'print'到'pprint.pprint',或者類似的東西? – abarnert 2013-02-19 23:46:44