def _on_linenumber_click(self, event):
        try:
            text_index = self.dte.index("@%s,%s" % (event.x, event.y))
            self.dte.mark_set("click", "%s linestart" % text_index)
            self.dte.tag_remove("sel", "1.0", "end")
            self.dte.tag_add("sel", "%s linestart" % text_index, "%s lineend+1c" % text_index)
            self.dte.mark_set("insert", "%s linestart" % text_index)
        except Exception, e:
            print "drat:", e
            import sys; sys.stdout.flush()
dataset/ETHPy150Open boakley/robotframework-workbench/rwb/editor/editor_page.py/EditorPage._on_linenumber_click/original