On Mon, 2004-10-18 at 13:05, Marcus Habermehl wrote: > Am Sonntag, den 17.10.2004, 16:36 -0500 schrieb Skip Montanaro: > > Marcus> I want to execute some shell commands in my python script. The > > Marcus> output should be redirected to a gtk.TextView in real-time. How > > Marcus> can I do this? > > > > Use os.popen or one of its cousins, capture the output via reads on the file > > object returned, then stuff it into the TextBuffer associated with your > > TextView widget. > > That I've making, now. But the text gets insert when the shell command > is finished. > > Is there are not another possibility?
Make sure the GUI is updated by flushing out all the events after every line of output. See http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq23.020.htp Or put the popen into its own thread? > > regard > > Marcus > > _______________________________________________ > pygtk mailing list [EMAIL PROTECTED] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ -- Steve McClure Racemi email: [EMAIL PROTECTED] 75 5th St NE voice: 404-892-5850 Suite 333 fax: 404-892-7215 Atlanta, GA 30308 http://www.racemi.com _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/