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

[Request] Implement pretty printing support in Jupyter notebook #199

Closed
Tracked by #318
shunghsiyu opened this issue Aug 12, 2022 · 1 comment
Closed
Tracked by #318

[Request] Implement pretty printing support in Jupyter notebook #199

shunghsiyu opened this issue Aug 12, 2022 · 1 comment

Comments

@shunghsiyu
Copy link
Contributor

Jupyter notebook and drgn seems to be a really great combination, it'd would be nice to see pretty printing of drgn object in Jupyter notebook implemented for a even better synergy (similar to what's being done in interactive mode).

In theory implementing _repr_pretty() is all that's needed, something like what stackoverflow suggests, but done with C inside libdrgn/python/object.c.

    def _repr_pretty_(self, p, cycle):
       p.text(str(self) if not cycle else '...')
@shunghsiyu shunghsiyu changed the title [Request] Implement pretty printing for Jupyter notebook [Request] Implement pretty printing support for Jupyter notebook Aug 15, 2022
@shunghsiyu shunghsiyu changed the title [Request] Implement pretty printing support for Jupyter notebook [Request] Implement pretty printing support in Jupyter notebook Aug 15, 2022
@osandov
Copy link
Owner

osandov commented Jul 3, 2023

I'm closing this one now since your pretty printing support was previously merged. #318 will track further integration.

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