[Tkinter-discuss] Weird bug in input widgets? (Michael Lange)

Raphaël SEBAN motus69110 at gmail.com
Sun Feb 1 15:13:45 CET 2015


Hi Michael,

Thank you for your reply, but I'm on a PC / Linux Ubuntu 14.10 with 
Tkinter/Tk version 8.6 for Python3, standard installation, no specific 
tuning.

I'm working this way to fit as much as possible with customers' machines 
who'd use my apps, generally without making any changes to their 
platform pre-installed packages.

I'm not looking for a bug fix on my own, I'd like to acknowledge 
Tkinter's dev team that this bug exists, hoping that in some late days 
it will be fixed everywhere for everybody. :)

I thought tkinter-discuss was the best place for this.
I don't know if there is a bugtracker for Tkinter somewhere.
I don't even know if Tkinter is still in development, in fact.

Is it?

Regards.

Le 31/01/2015 12:00, tkinter-discuss-request at python.org a écrit :
> Send Tkinter-discuss mailing list submissions to
> 	tkinter-discuss at python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://mail.python.org/mailman/listinfo/tkinter-discuss
> or, via email, send a message with subject or body 'help' to
> 	tkinter-discuss-request at python.org
>
> You can reach the person managing the list at
> 	tkinter-discuss-owner at python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Tkinter-discuss digest..."
>
>
> Today's Topics:
>
>     1. Weird bug in input widgets? (Rapha?l SEBAN)
>     2. Re: Weird bug in input widgets? (Michael Lange)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 31 Jan 2015 09:20:06 +0100
> From: Rapha?l SEBAN <motus at laposte.net>
> To: tkinter-discuss at python.org
> Subject: [Tkinter-discuss] Weird bug in input widgets?
> Message-ID: <54CC9036.5060705 at laposte.net>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> Hi all,
>
> While working on my latest software (tkScenarist on GitHub), I
> encountered a really weird issue: once cleared, input widgets such as
> Text, Entry, ttk.Entry do *NOT* accept composite-accented letters
> (french ?, ?, etc) any more.
>
> So, to get sure, I made the following test code:
>
> [CODE]
> #!/usr/bin/env python3
> # -*- coding: utf-8 -*-
>
> from tkinter import *
>
> def clear_all (event=None):
>       # clear stringvars
>       for svar in cvars:
>           svar.set("")
>       # end for
>       # clear text widgets
>       for wtext in texts:
>           wtext.delete("1.0", END)
>       # end for
> # end def
>
> def test (nb_of_widgets):
>       global root, cvars, texts
>       root = Tk()
>       root.title("test #{}".format(nb_of_widgets))
>       cvars = list()
>       for n in range(nb_of_widgets):
>           svar = StringVar()
>           cvars.append(svar)
>           Entry(root, textvariable=svar).pack()
>       # end for
>       texts = list()
>       for n in range(nb_of_widgets):
>           wtext = Text(root, height=2, width=20)
>           wtext.pack()
>           texts.append(wtext)
>       # end for
>       Button(root, text="Clear all", command=clear_all).pack(side=LEFT)
>       Button(root, text="Quit", command=root.destroy).pack(side=RIGHT)
>       # events main loop
>       root.mainloop()
> # end def
>
> if __name__ == "__main__":
>       # launch test series
>       for n in range(1, 4):
>           test(n)
>       # end for
> # end if
> [/CODE]
>
> Detailed description of the issue:
>
> * French keyboards are arranged in such a way that you must compose
> accented letters as ? (e circumflex) or ? (e diaeresis) by pressing
> first the '^' key and then the letter to compose with (e.g. a, e, i, o,
> u, y) in order to get the final composite-accented letter (?, ?, ?, ?,
> and so on);
>
> * when you launch the test script (cited above) and then type, let's
> say, the e circumflex letter (?) into the Entry widget and into the Text
> widget, respectively:
>
> 	* the first time, you'll get the right letters inserted into the input
> widgets;
> 	* then click on 'Clear all' button and enter once again the same
> composite-accented letter into *ALL* the input widgets;
> 	* secund time, only the last pack()-ed input widget will get the right
> input, all other widgets will show unaccented letters;
>
> * the test script tries with 1 Entry and 1 Text input widgets, then with
> 2 input widgets and finally with 3 input widgets;
>
> * each time you get the same issue: only the last pack()-ed input widget
> shows the right input letter, all the rest showing unaccented letters.
>
> This issue is quite embarrassing for me as my latest software manages
> with movie scenario scriptwriting, which *MUST* be written with correct
> accents in French, otherwise all the purpose of the software would collapse.
>
> Is this a known issue?
>
> Thank you for your expert advice.
>
> Regards.
>
> Rapha?l SEBAN alias tarball69.
>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 31 Jan 2015 10:29:35 +0100
> From: Michael Lange <klappnase at web.de>
> To: tkinter-discuss at python.org
> Subject: Re: [Tkinter-discuss] Weird bug in input widgets?
> Message-ID: <20150131102935.7159e8d2bae539572639eb3d at web.de>
> Content-Type: text/plain; charset=UTF-8
>
> Hi Rapha?l,
>
> I cannot reproduce this behavior here (debian wheezy, Tk-8.5.11), however
> I could only test it with a german keyboard layout with X-Composite key or
> with dead keys temporarily enabled in xfce. I don't think that should
> matter, though, here everything seems to work fine.
>
> I can only guess, but it sounds to me like a platform- and/or Tk-version
> specific issue. If you are running OS X and a recent version of Tk it
> might or might not have something to do with the bug described here:
>      http://sourceforge.net/p/tktoolkit/bugs/2722/
> resp. with the fix that was supplied for that bug. That is is just a shot
> in the dark of course.
>
> Regards
>
> Michael
>
>
> On Sat, 31 Jan 2015 09:20:06 +0100
> Rapha?l SEBAN <motus at laposte.net> wrote:
>
>> (snipped reply)
>> _______________________________________________
>> Tkinter-discuss mailing list
>> Tkinter-discuss at python.org
>> https://mail.python.org/mailman/listinfo/tkinter-discuss
> .-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.
>
> Compassion -- that's the one things no machine ever had.  Maybe it's
> the one thing that keeps men ahead of them.
> 		-- McCoy, "The Ultimate Computer", stardate 4731.3
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss at python.org
> https://mail.python.org/mailman/listinfo/tkinter-discuss
>
>
> ------------------------------
>
> End of Tkinter-discuss Digest, Vol 130, Issue 8
> ***********************************************
>


More information about the Tkinter-discuss mailing list