On Mon, Aug 1, 2011 at 5:18 PM, Andreas Kloeckner
<[email protected]> wrote:
> On Mon, 1 Aug 2011 16:55:26 -0600, Aaron Meurer <[email protected]> wrote:
>> On Mon, Aug 1, 2011 at 9:57 AM, Andreas Kloeckner
>> <[email protected]> wrote:
>> > On Fri, 29 Jul 2011 22:37:16 -0600, Aaron Meurer <[email protected]> 
>> > wrote:
>> >> Andreas, how should I do this?  I can either manually wrap text, or I
>> >> can change it to use some built-in urwid object that does wrapping
>> >> automatically.  The former would be easier, as it's kind of hard-coded
>> >> to have plain text rather than urwid.Text, but maybe you can think of
>> >> a reason why doing urwid.Text (or whatever) would be better.
>> >
>> > If you think you can hack up wrapping quickly, go for it. I think I
>> > opted for 'make my own widget' simply because it allowed me to use
>> > multiple attributes easily, without having to muck around with multiple
>> > objects and a container around them.
>>
>> It shouldn't be too hard to break the string into colsize chunks.  I
>> just don't know if there are any caveats of doing it manually vs.
>> using urwid code.  I can't imagine there would be, but I'm not much of
>> a tty programmer.
>
> Are you planning on taking word boundaries into account when wrapping?
> (If there aren't any within range, you have to brutally chop, though.)
> Also, I'd prefer if continuation lines were slightly indented. You
> probably want to cache your indentation work between num_rows and
> render. You could use \u2936 as a wrap marker.

I wasn't planning on using word boundaries at all.  I suppose that
would be an advantage of using the urwid classes.  I was planning on
keeping continuation lines indented (similar to what is already done
if the variable name is long).

>
>> Yes, I definitely think I would want to turn wrapping off, esp. on a
>> per-variable basis.  Sometimes, you care about the whole variable, and
>> sometimes you don't.  In SymPy, I very often deal with variables whose
>> string values are 10000 characters long or even longer (this was also
>> the motivation for my custom stringifier example, because sometimes
>> the speed of the printer is less than ideal).
>
> Truncation doesn't have to be fancy. Just make the toggle between
> "display single line, with '...' at the end", or wrapped. (perhaps even
> a Unicode ellipsis?)
>
> Andreas

So PuDB requires a unicode terminal?

Aaron Meurer

_______________________________________________
Pudb mailing list
[email protected]
http://lists.tiker.net/listinfo/pudb

Reply via email to