Re: Best way to busy-wait in Python 3 / Gtk+ 3?



It looks like I could put it into the constructor for the TEDTalkWidget,
right? Because that would be awesome.

On 8 October 2012 08:32, Simon Feltman <s feltman gmail com> wrote:

Agreed, better yet, the code could become much simpler using an async
pixbuf:

def on_image_ready(stream, res, user_data):
    pixbuf = GdkPixbuf.Pixbuf.new_from_stream_finish(res)
    ...
file = Gio.File.new_for_uri("...")
GdkPixbuf.Pixbuf.new_from_stream_async(file.read(None), None,
on_image_ready, None)

All within a main loop of course.

-Simon
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




-- 
_____________________
Filip Lamparski - FB <https://www.facebook.com/filip.lamparski> -
G+<https://plus.google.com/105688569486178456264/posts>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]