Hi all,
I have a little question about textbuffer.
The following code works good, the buffer will go straight to the textview,
but if the process is quite long the window will freeze (also for a minute)
until the command have finish, and the output will be shoot into the window
in one time.
My question is if for you is possible to stream the output to the textview
fluently and not all in one time.
configure = ("./configure --with-pthread")
makeinstall = (configure + ' && make && make install')
command = makeinstall
child_e, child_o = os.popen4(command)
data_o = child_o.read()
textbuffer.set_text(data_o)
textview = gtk.TextView()
textview.set_wrap_mode(gtk.TRUE)
textview.set_editable(False)
textview.modify_font(pango.FontDescription("Monospace"))
sw = gtk.ScrolledWindow()
sw.show()
sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
sw.add(textview)
frame = gtk.Frame();
frame.set_shadow_type(gtk.SHADOW_IN)
frame.add(sw)
frame.set_border_width(6)
textbuffer = textview.get_buffer()
textview.set_size_request(gtk.gdk.screen_width()/3, gtk.gdk.screen_height()/5)
table.attach(frame, 0, 8, 3, 12)
frame.show()
window.show_all()
window.show()
Thanks in advance
Mario aka Liquid
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/