-
Notifications
You must be signed in to change notification settings - Fork 11
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
Octave functions to display mimetypes #41
Comments
From the IPython doc https://ipython.readthedocs.io/en/stable/config/integrating.html#rich-display Should we pick a convention for naming such methods in Octave? |
Also relating to #50, it seems that it is not XOctave but Octave itself that does the display. |
From what I know Octave has two ways of showing output: the When the interpreter evaluates the parse-tree of some code, it automatically inserts a So the method for integrating rich output display is overriding the display function (unless we want to start poking with the parse-tree, which is possible, I think, but a lot messier and probably a lot of work). If one wants the textual version they would use the In Octave the Classes can on the other hand easily provide a custom display method, so my idea was that class authors should check if they are running in a xoctave instance (e.g. by checking the global variable The For ease of use, then, I thought it might be helpful to provide a few prebaked functions (e.g. Those functions would be then used by class authors in their own |
That explains a lot, thanks for this valuable information.
I didn't know that. I don't think it's so bad. Libraries like numpy and pandas in Python also have global styling options.
I like that plan. The |
I totally agree with you, this was my plan too, but I didn't tackle it because it was almost as defining an API, and I didn't have enough information to make choices that I would have needed to support in the future even if they were the wrong ones. Regarding scoping it's totally possible (as I have found developing the widgets) by simply placing the relevant m-file inside a
See: xeus-octave/share/xeus-octave/@sym/display.m Lines 1 to 6 in 8150461
|
We should add functions to display Octave objects as specific output mimes
The text was updated successfully, but these errors were encountered: