[Pygui] Force Refresh?

Mark Melvin mark.melvin at gmail.com
Mon Mar 28 16:40:39 CEST 2011


On Fri, Mar 25, 2011 at 8:25 PM, Greg Ewing <greg.ewing at canterbury.ac.nz>wrote:

> Mark Melvin wrote:
>
>> I am using a Label as a type of status text.  I am finding that if it call
>> set_text("String") on it, then do some other stuff right away, the text is
>> not updated until later.
>>
>
> How much later? It should get updated before the user gets
> a chance to do anything else.
>
> There's an update() method, but it's currently not available
> on all widgets. I'll see about making it more general.
>
>
I am setting the label text, doing some communication over a USB port (which
can take a couple seconds), then setting the text to something else.  I
never see the first label change.  Inserting time.sleep(x) does nothing, but
I am assuming this is a threading thing.  It may work if I do my USB stuff
in a background thread, but that is major change and I don't really want to
get into threading for this.  I have a Label "placed" inside my main Window,
and I don't see any update methods available on either of these. :(

Thanks,
Mark.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pygui/attachments/20110328/2dcf1234/attachment.html>


More information about the Pygui mailing list