Re: apostrophe not considered with tkinter's wordstart and wordend

2015-01-24 Thread ravas
I copied the GUI creation from my personal text editor. The scrollbar and stretchability could have been left out, for sure. You're only seeing a portion of a more complex GUI. After writing several Tkinter applications, I decided that subclassing without a clear reason only had the effect of

Re: apostrophe not considered with tkinter's wordstart and wordend

2015-01-24 Thread Rick Johnson
On Saturday, January 24, 2015 at 9:17:57 PM UTC-6, ravas wrote: > We resolved it over at the comp.lang.tcl group. It turns > out what Christian suggested affects what is selected when > you double click a word. He later discovered a different > method for producing what I want. Below is my test cod

Re: apostrophe not considered with tkinter's wordstart and wordend

2015-01-24 Thread ravas
We resolved it over at the comp.lang.tcl group. It turns out what Christian suggested affects what is selected when you double click a word. He later discovered a different method for producing what I want. Below is my test code that implements both of these things (tested with Python 3.4 and PyCh

Re: apostrophe not considered with tkinter's wordstart and wordend

2015-01-24 Thread Rick Johnson
On Thursday, January 22, 2015 at 4:26:29 PM UTC-6, Christian Gollwitzer wrote: > Well, it turns out you actually can. We don't have Guido's > time machine, but still there is a configuration option in > Tk, albeit a very obscure one: you have to set the global > Tcl variables tcl_wordchars and tcl

Re: apostrophe not considered with tkinter's wordstart and wordend

2015-01-22 Thread Christian Gollwitzer
Am 05.01.15 um 14:20 schrieb Rick Johnson: *GASP*! Of course all this could be avoided if those short- sighted TK folks would have allowed the programmer to define the pattern! ಠ_ಠ Well, it turns out you actually can. We don't have Guido's time machine, but still there is a configuration opti

Re: apostrophe not considered with tkinter's wordstart and wordend

2015-01-05 Thread Rick Johnson
On Monday, January 5, 2015 2:01:22 AM UTC-6, ravas wrote: > I'm curious about what events you would use. The only work > around I thought of is to create a word list and then > apply tags & use tag_bind(). Well i'm not sure what you are doing exactly, so i'll have to take some liberties here, but

Re: apostrophe not considered with tkinter's wordstart and wordend

2015-01-05 Thread ravas
Thanks guys :-] Rick Johnson: > but you could implement any pattern matching you want > by binding the correct events and then processing the > "target string" on the Python side. I'm curious about what events you would use. The only work around I thought of is to create a word list and then app

Re: apostrophe not considered with tkinter's wordstart and wordend

2015-01-04 Thread Rick Johnson
On Saturday, January 3, 2015 2:28:18 PM UTC-6, ravas wrote: > Is it possible that this could be added in an upcoming > version of Python -- or is this a Tk issue? A quick look at the Tkinter.Text.get source code will answer that question for you: py> import inspect py> from Tkinter import Text p

Re: apostrophe not considered with tkinter's wordstart and wordend

2015-01-03 Thread Peter Otten
ravas wrote: > 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. >