Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: ptpython extra #35

Open
carlwgeorge opened this issue Feb 20, 2019 · 1 comment
Open

feature request: ptpython extra #35

carlwgeorge opened this issue Feb 20, 2019 · 1 comment

Comments

@carlwgeorge
Copy link

I would love to see an integration for ptpython. Other people are interested too.

@tommikaikkonen
Copy link
Owner

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 (prompt-toolkit/ptpython#153 (comment)).

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants