#14266: Pretty Console Output --> ascii art
---------------------------------------+------------------------------------
Reporter: elixyre | Owner: was
Type: task | Status: needs_review
Priority: major | Milestone: sage-5.10
Component: user interface | Resolution:
Keywords: ascii-art | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Jean-Baptiste Priez | Merged in:
Dependencies: | Stopgaps:
---------------------------------------+------------------------------------
Comment (by vbraun):
The doctesting should be mostly utf-8 clean, I think. See also #14153.
What exactly is the problem?
The stty: stdin isn't a terminal comes because the controlling terminal
isn't a terminal for doctests. You should set a fixed width (probably 80)
independent of the actual terminal size during doctests, something like
this:
{{{
def terminal_width():
import os, sys
from sage.doctest import DOCTEST_MODE
isatty = os.isatty(sys.stdout.fileno())
if DOCTEST_MODE or not isatty:
return 80
import fcntl, termios, struct
rc = fcntl.ioctl(int(0), termios.TIOCGWINSZ,
struct.pack('HHHH', sys.stdout.fileno(), 0, 0, 0))
h, w, hp, wp = struct.unpack('HHHH', rc)
return w
}}}
The "pcp" abbreviation is still floating around in a few places, can you
replace those?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14266#comment:35>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.