self._msg_i += 1
i = self._tb.get_end_iter()
self._tb.insert(i, """
* Message {0} recieved!""".format(self._msg_i), -1)
return True

def _autoscroll(self, *args):
    """The actual scrolling method"""
adj = self._sw.get_vadjustment()
adj.set_value(adj.get_upper() - adj.get_page_size())
if __name__ == '__main__':
    w = W()
Gtk.main()
Scroll to end of ScrolledWindow/TextView