How do I enable pretty printing by default in IPython? I haven't been able to find clear instructions anywhere on how to do this. Thanks much!
Enable pretty printing by default in IPython
Asked Answered
$ 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.
© 2022 - 2024 — McMap. All rights reserved.
Out [123]:
lines in IPython to do the equivalent ofpprint.pprint(_)
instead ofprint(repr(_))
, or do you want to hook every call toprint
topprint.pprint
instead, or something like that? – Tsarism%pprint
enabled by default, that's just a config setting—and it's already enabled by default, unless you changed something. (At least if youpip install ipython
, or install the RPM/DEB/port/etc. on any system I've used, it's enabled by default; it's always possible that some platform/distro does things differently.) – Tsarism