-
Notifications
You must be signed in to change notification settings - Fork 154
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
Support ipython style HTML / SVG display with _repr_html_ #191
Comments
Pasting the following piece of code in the console allows formatted output.
|
Thanks @TobiG, this is pretty neat! Are you interested in working on this yourself? I'd be happy to provide a few pointers as to how it could fit into the existing code and API. |
On 05/30/2016 03:12 AM, Ryan Kelly wrote:
No promises, unfortunately. However, if you could point out how you Tobias |
I've been trying to think of a good way to incorporate this. The code for making an interactive shell with jqconsole lives in a separate repo here: https://github.com/pypyjs/pypyjs.github.io/blob/master/index.html So one option could be to just have that code execute something like your displayhook setup as part of its initialization procedure. But that's not very re-usable. A more general solution might add support for this into the underlying |
What about doing the following:
|
Similar to ipython pypyjs is working in a web browser, so it is simple to display rich HTML / SVG output. Ipython makes this functionality available by allowing for additional repr*_ methods [1] that are used to print objects in HTML/SVG.
Using sys.displayhook (https://docs.python.org/2/library/sys.html#sys.displayhook) and jqconsole.Append() this could probably be implemented without too much effort.
[1] http://ipython.readthedocs.io/en/stable/config/integrating.html
The text was updated successfully, but these errors were encountered: