Unfortunately, it seems it is not possible to supply a custom terminal
width.  It would be great to add this as a setting to PrettyPrinter.
It would flow through to the render() function in that file you
mentioned, and would override the value calculated from
terminal_width() (the default setting would be None, which would do
what it does now).

If you could implement this, it would be great.  We can help you with
the patch.  Do you already know how to use git?  We have an extensive
guide on all aspects of patch submission at
https://github.com/sympy/sympy/wiki/Development-workflow#wiki-how-to-send-a-patch
if you need guidance (or just ask us here).

Aaron Meurer

On Thu, Aug 11, 2011 at 12:33 PM, Roberto Colistete Jr.
<roberto.colist...@gmail.com> wrote:
>    Hi,
>
>    In "Integral" (http://www.robertocolistete.net/integral/) the
> bidimensional output uses SymPy pretty printing. But the number of
> columns is read from the x-terminal configuration (so a larger font
> size means less columns).
>
>    Is it possible to set the number of columns for pretty printing ?
>
>    I found "sympy/printing/pretty/stringpict.py" with function
> "terminal_width() that reads the curses configuration :
>
> "import curses
>            try:
>                curses.setupterm()
>                ncols = curses.tigetnum('cols')"
>
>    As a workaround, in "Integral" @ Maemo 5 OS I force to open a x-
> terminal and set its font size using gconftool. But sometimes the x-
> terminal font size on Maemo 5 OS does not change (I think it is a
> bug).
>
>    If somebody has a more elegant solution, it will be welcome.
>
>       Roberto
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To post to this group, send email to sympy@googlegroups.com.
> To unsubscribe from this group, send email to 
> sympy+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sympy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to