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
pretty_print_default fails in a terminal session #15271
Comments
comment:1
As commented in the function, this should probably be removed from the global namespace. It is really not useful in the terminal. |
comment:2
Correct, the terminal uses IPython's machinery instead of
I see that we don't actually doctest that, this ought to be added to |
comment:3
If we want to fix this function, can this be made to call whatever the magic Maybe run the current code inside a |
comment:4
We can, but imho we should just remove |
comment:5
Let's use this ticket for removing the function from the global namespace. |
comment:6
@gvol - Would the emacs interface work if you set |
comment:8
Replying to @gvol:
No. That exists from earlier, probably sage-5.11 (#12719). |
comment:9
Replying to @gvol:
I spoke too soon. Using |
comment:10
No graphics is shown in Whats wrong with |
comment:13
Sage mode now uses |
comment:15
At least from the command line. Possibly also However, this is needed in all_notebook.py, so don't just remove it completely! |
comment:16
pretty_print_default seems to no longer be in the global namespace in a terminal session, so I move we close this as won't fix. |
Calling pretty_print_default in a terminal fails:
Perhaps calling pretty_print_default doesn't make much sense in the terminal, but it's used in the emacs interface to be able to display typeset output.
I think doctests pass because the doctesting framework sets sys.displayhook to something else, namely
sage.misc.displayhook.DisplayHook(sys.displayhook)
. I think the regression was introduced in #15168, and so I have cc'ed the people involved there in case they want to weigh in on how this should be fixed.CC: @vbraun @ppurka @novoselt
Component: user interface
Issue created by migration from https://trac.sagemath.org/ticket/15271
The text was updated successfully, but these errors were encountered: