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

Handle %pprint correctly #22968

Open
sagetrac-tmonteil mannequin opened this issue May 10, 2017 · 7 comments
Open

Handle %pprint correctly #22968

sagetrac-tmonteil mannequin opened this issue May 10, 2017 · 7 comments

Comments

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented May 10, 2017

From the IPython REPL launched from Sage (by running sage --ipython in a terminal),
we can switch off pretty printing as follows:

In [1]: [10**13]*5
Out[1]:
[10000000000000,
 10000000000000,
 10000000000000,
 10000000000000,
 10000000000000]

In [2]: %pprint
Pretty printing has been turned OFF

In [3]: [10**13]*5
Out[3]: [10000000000000, 10000000000000, 10000000000000, 10000000000000, 10000000000000]}}}

However, from the Sage REPL itself, or in a Sage Jupyter notebook, this does not work:

sage: [10^13]*5
[10000000000000,
 10000000000000,
 10000000000000,
 10000000000000,
 10000000000000]
sage: %pprint
Pretty printing has been turned OFF
sage: [10^13]*5
[10000000000000,
 10000000000000,
 10000000000000,
 10000000000000,
 10000000000000]

Does this come from a broken interaction with Sage's own
pretty printing features (which focus more on latexing)?

This was reported on Ask Sage twice:

CC: @vbraun @tscrim @fchapoton @slel @seblabbe

Component: user interface

Keywords: pprint

Issue created by migration from https://trac.sagemath.org/ticket/22968

@sagetrac-tmonteil sagetrac-tmonteil mannequin added this to the sage-8.0 milestone May 10, 2017
@sagetrac-tmonteil

This comment has been minimized.

@sagetrac-tmonteil

This comment has been minimized.

@slel
Copy link
Member

slel commented Jun 6, 2018

Changed keywords from none to pprint

@slel

This comment has been minimized.

@slel

This comment has been minimized.

@slel

This comment has been minimized.

@slel slel changed the title Sage's jupyter console does not handle %pprint correctly Handle %pprint correctly Jun 6, 2018
@slel

This comment has been minimized.

@mkoeppe mkoeppe removed this from the sage-8.0 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants