def getCurrentWord(self, entry): i = entry.get_point() text = entry.get_chars(0,-1) word = re.split(r'\s', text)[-1] start = string.rfind(text, word) end = start+len(word) return (word, (start, end))