buffer_ self tv get_buffer return_val buffer_ get_selection_bounds sta

1
2
3
4
buffer_ = self.tv.get_buffer()
return_val = buffer_.get_selection_bounds()
start_sel, finish_sel = return_val[0], return_val[1]
selected = buffer_.get_text(start_sel, finish_sel)