apostrophe not considered with tkinter's wordstart and wordend

ravas ravas at outlook.com
Sat Jan 3 21:28:07 CET 2015

When I place my mouse over a word (and I press something) 
I want the program to analyze the word.
Tkinter almost provides the perfect option:
self.text.get('current wordstart', 'current wordend')

Unfortunately apostrophes are not considered using wordstart and wordend.
"For the purposes of this operation, a word is either 
a string of consecutive letter, digit, or underbar (_) characters, 
or a single character that is none of these types."

The easy work around is to highlight the word and use:
self.text.get('sel.first', 'sel.last')

However, it seems like it could be an easy improvement 
if we could include the apostrophe in the list of word characters.
Is it possible that this could be added in an upcoming version of Python -- 
or is this a Tk issue?

Windows 7 & Python 3.4

More information about the Python-list mailing list