[Urwid] Problem with Text and Listbox Widgets

Rupp, Lawrence E lawrence.e.rupp at boeing.com
Thu Apr 12 18:43:56 EDT 2012


Darn, now that you mention it, it just might.  The text that I am inserting is coming from a 'print' statement in a subprocess through a pipe.  It may well have a 'newline' automatically appended.  I didn't consider that because some of the text that is passed is converted to integers in the main process, and the newline problem doesn't appear with ints.

Is there some other way to pass data back through a pipe than with a print statement?  Maybe a function 'return' or something? 

Thanks for the quick response, Ian, and thanks for the 2nd point of view.  I'll check the return through the pipe and let you know either way.


-----Original Message-----
From: urwid-bounces at lists.excess.org [mailto:urwid-bounces at lists.excess.org] On Behalf Of Ian Ward
Sent: Thursday, April 12, 2012 3:36 PM
To: Urwid General Discussion
Subject: Re: [Urwid] Problem with Text and Listbox Widgets

On Thu, Apr 12, 2012 at 5:52 PM, Rupp, Lawrence E <lawrence.e.rupp at boeing.com> wrote:
> The problem I'm having is that when I update one of the Text widgets with 'varname.set_text("example"), the text string "example" appears in the appropriate Text widget, but it also appears to add a carriage return, meaning the entire display below the updated Text widget shifts down one line.  How do I prevent this from happening?  How can I simply overwrite what was in the Text widget in the first place without a new line showing up?

That shouldn't happen.  Can you post some code that demonstrates the problem you're having?  Are you sure the text you're inserting doesn't have a trailing newline?

Urwid mailing list
Urwid at lists.excess.org

More information about the Urwid mailing list