[pygtk] Textview to Tail a log file
Mark Stahler
isignupnow at gmail.com
Sun Dec 2 13:49:19 WST 2007
Hi,
I am new to GTK+ so please go easy on me. I am puzzled as to why my
simple function is not working:
def refreshLog(self):
file = open('log.txt')
string = file.read()
textview = self.gui.get_widget("bottom_textview")
textbuffer = textview.get_buffer()
textbuffer.set_text(string)
iter = textbuffer.get_end_iter()
iter.forward_to_end()
print iter.is_end()
print textview.scroll_to_iter(iter, 0, True)
is_end returns true so I know my iterator is at the end of the text file
yep scroll_to_iter returns false and does not scroll at all. What is
wrong? Could it be something in my glade file? The rest of the gui
works. Thanks
Mark
More information about the pygtk
mailing list