Re: tkinter textwidget problem

2008-10-03 Thread kib2
Tk/Tkinter apparently considers the position 1.13 to be after the last word in the text. You get the same problem if you set the insertion point just after the word 'two' for example: text.index('insert') returns 1.7 and text.index('insert wordstart') returns 1.7 too... Exactly. My solution w

Re: tkinter textwidget problem

2008-10-03 Thread Eric Brunel
On Thu, 02 Oct 2008 21:57:01 +0200, kib2 <[EMAIL PROTECTED]> wrote: Hi, In a tkinter TextWidget I would like to retrieve the last typed word. I've tried this with the 'wordstart' Expression [From the effbot site, "wordstart" and "wordend" moves the index to the beginning (end) of the curren

tkinter textwidget problem

2008-10-02 Thread kib2
Hi, In a tkinter TextWidget I would like to retrieve the last typed word. I've tried this with the 'wordstart' Expression [From the effbot site, "wordstart" and "wordend" moves the index to the beginning (end) of the current word. Words are sequences of letters, digits, and underline, or singl