python - Read text from TextBuffer in pyGtk using TextMarks -


i using multiline text view , text buffer manipulate text in pygtk. want read input position insert pressed last time, , current position insert pressed again.

def markit(self, pos):     mark = self.create_mark(mark_name = 'startinsert', = pos, left_gravity = true)     mark.set_visible = true     return mark  def keypress(widget, event): if event.keyval == 65293:     buff = termwindow.get_buffer()     # read command.      ### how this?????      print command     # delete previous created mark.     buff.delete_mark_by_name('startinsert')     buff.markit(current_pos)     return true return false 

this mark create every time in enter key callback function. initially, position can zero. also, though did set visibility true, not visible.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -