prettyprinter
prettyprinter copied to clipboard
feature request: ptpython extra
I would love to see an integration for ptpython. Other people are interested too.
I looked into the code in ptpython
that prints evaluated values in the REPL. It's not very feasible to inject prettyprinter
there right now. I left a comment about that in the issue you linked to (https://github.com/prompt-toolkit/ptpython/issues/153#issuecomment-465896922).
If you or someone else were to create a PR to ptpython
to make the integration feasible, it shouldn't be too hard to provide the integration on the prettyprinter
side. A minimum would be to have a single method on the ptpython.repl.PythonRepl
class that handles printing the evaluated value, so that prettyprinter
could monkeypatch that method with its own. A nicer integration would be through a configurable hook as a part of the ptpython
public API.