[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-06-24 Thread klappnase
klappnase added the comment: The behavior of Tkinter when handling boolean values appears to be a bit erratic at times, not only BooleanVar.get() returns 0/1 instead of True/False (e.g. see the thread at tkinter-discuss: http://mail.python.org/pipermail/tkinter-discuss/2012-June/003176.html

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-06-25 Thread klappnase
klappnase added the comment: I agree that get() should better return a boolean in any case, however the bug then is not one of BooleanVar but rather one of tk.getboolean(). I did some experimenting with get() and it seems that there are three possibilities: getboolean() returns True/False as

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-06-25 Thread klappnase
klappnase added the comment: "...you could not pass the return value of getboolean() any longer to BooleanVar.get() which would be really bad." Ooops, typo, should be BooleanVar.set() of course. -- ___ Python tracker <http://bu

[issue17397] ttk::themes missing from ttk.py

2013-11-30 Thread klappnase
klappnase added the comment: > What is your real name? Michael Lange > What should I add in the Misc/ACKS file? Hmm, personally I'd prefer the nick, but it seems to be common practice to use the real name; I think I'll

[issue17397] ttk::themes missing from ttk.py

2013-12-01 Thread klappnase
klappnase added the comment: > Are 'unloaded but available' themes really available to use? Yes. > Does Style.theme_use(available_name) work? Yes. > If so, it seems to me that available_name should > be reported by theme_names. I agree, one should think so. I am not 1

[issue1525806] Tkdnd mouse cursor handling patch

2009-04-23 Thread klappnase
klappnase added the comment: Maybe this depends on whether the dragged item is "clickable" like listbox items and buttons or not , like the Labels in the Tkdnd demo. Ok, I wrote a second patch that solves this by adding another option to dnd_start(); if this option is set to True (t

[issue17397] ttk::themes missing form ttk.py

2013-03-11 Thread klappnase
New submission from klappnase: When trying to load third-party themes ttk.Style.theme_names() fails to list available themes. For example if the themes from the tile-themes project are installed one can do: >>> from tkinter import * >>> from tkinter import ttk >>>

[issue17397] ttk::themes missing from ttk.py

2013-03-12 Thread klappnase
Changes by klappnase : -- title: ttk::themes missing form ttk.py -> ttk::themes missing from ttk.py ___ Python tracker <http://bugs.python.org/issue17397> ___ _

[issue17397] ttk::themes missing from ttk.py

2013-03-18 Thread klappnase
klappnase added the comment: I am not familiar with python's test unit, but I tried my best. As far as I see there are three possibilities to invoke the function: * without pattern -> return tuple with all themes * with pattern that matches one or more themes * with pattern that ma

[issue17397] ttk::themes missing from ttk.py

2013-03-18 Thread klappnase
klappnase added the comment: Update: I just tried Python-3.3.0 on WinXP, the same error, so it is obviously _not_ a bug specific to the debian python install. -- ___ Python tracker <http://bugs.python.org/issue17

[issue17397] ttk::themes missing from ttk.py

2013-03-18 Thread klappnase
klappnase added the comment: Yes, I happen to encounter these TclObjects occasionally, e.g. (not tested with the latest python): $ python3 Python 3.1.3 (r313:86834, Nov 28 2010, 11:28:10) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "lice

[issue28498] tk busy command

2016-10-21 Thread klappnase
klappnase added the comment: Funny thing, just today I came across the same issue. So far I came up with an a little bit refined version of the OP's suggestions. Until now I have tested this with Python-2.7.9 and tk-8.6.0 on debian Jessie, I think the same code should work for Python-3

[issue28498] tk busy command

2016-10-21 Thread klappnase
klappnase added the comment: Oops, just made a quick test with Python3, and found that I had missed that types.StringType is no longer present. So to be compatible with Python3 the busy_configure() func ought to look like: def busy_configure(self, cnf=None, **kw): if kw

[issue28498] tk busy command

2016-10-22 Thread klappnase
klappnase added the comment: Ok, I investigated this a little further. First I noticed another bug with the code from my first post, the "self._w" must be omitted from the call to busy_current(), so the func should look like: def busy_current(self, pattern=None): re

[issue28498] tk busy command

2016-10-22 Thread klappnase
klappnase added the comment: @Miguel About tk_busy_configure(): I strongly suggest that my version of tk_busy_configure() is better, since it behaves exactly like the usual configure() methods in Tkinter (which includes e.g. Canvas.itemconfigure() or Text.tag_configure()), i.e. you can not

[issue28498] tk busy command

2016-10-23 Thread klappnase
klappnase added the comment: As far as I can see, most internal Tkinter methods use _getboolean(), which currently looks like: def _getboolean(self, string): """Internal function.""" if string: return self.tk.getboolean(string)

[issue28498] tk busy command

2016-10-23 Thread klappnase
klappnase added the comment: Hi Miguel, about _configure() : the code you suggest: def _configure(self, cmd, cnf, kw): """Internal function.""" if kw: cnf = _cnfmerge((cnf, kw)) elif cnf: cnf = _cnfmer

[issue28498] tk busy command

2016-10-23 Thread klappnase
klappnase added the comment: Your changed _configure() will also break Canvas/Listbox.itemconfigure(), Menu.entryconfigure() and a number of other methods, Tix is also affected. It will also break third party extensions that use _configure(), like pybwidget. As another python motto says

[issue28498] tk busy command

2016-10-23 Thread klappnase
klappnase added the comment: "Also it's more efficient to use this than the function _flaten() in that situation: if not self._w in cmd: cmd = (self._w,) + cmd " The construct with _flatten() was not my invention, it's probably something to discuss with Guido

[issue28498] tk busy command

2016-10-23 Thread klappnase
klappnase added the comment: "This is my point of view: These functions are easy to change: itemconfigure(), entryconfigure(), image_configure(), tag_configure() and window_configure() It's only to add self._w in the proper place. Only one line per method" At least Tix w

[issue28498] tk busy command

2016-10-23 Thread klappnase
klappnase added the comment: And another thing: "There is no test that shows that self.tk.getboolean is buggy." Well... $ python3 Python 3.4.2 (default, Oct 8 2014, 10:45:20) [GCC 4.9.1] on linux Type "help", "copyright", "credits" or "lice

[issue28498] tk busy command

2016-10-23 Thread klappnase
klappnase added the comment: The bug is that tk_strictMotif (which uses self.tk.getboolean() itself) returns 0 instead of False. I used the "nested" command to point out, that self.tk.getboolean() is broken when used with wantobjects=True, because it does *not* return proper bool

[issue28498] tk busy command

2016-10-24 Thread klappnase
klappnase added the comment: At least with python 3.4 here wantobjects still is valid, and personally I really hope that it remains this way, because I use to set wantobjects=False in my own code to avoid having to deal with errors because of some method or other unexpectedly returning

[issue28498] tk busy command

2016-10-24 Thread klappnase
klappnase added the comment: Hi Serhiy, thanks for the feedback. "+def tk_busy(self, **kw): Shouldn't it be just an alias to tk_busy_hold?" Not sure, I figured since it is a separate command in tk I would make it a separate command in Python, too. "+def tk_

[issue28498] tk busy command

2016-10-26 Thread klappnase
klappnase added the comment: Ok, I hope I applied all the required changes now. The tests seemed to me to belong to test_misc, so I just added another function to the MiscTest class, I hope that is ok. The test runs well here, so I hope I did everything correctly. Thanks for your patience

[issue28498] tk busy command

2016-10-26 Thread klappnase
klappnase added the comment: Oops, I guess I violated PEP257 again, sorry, corrected version #4 attached. -- Added file: http://bugs.python.org/file45231/tk_busy_4.diff ___ Python tracker <http://bugs.python.org/issue28

[issue28498] tk busy command

2016-10-26 Thread klappnase
klappnase added the comment: This is something entirely different, since the commands you list here in tk do not accept keyword arguments at all. -- ___ Python tracker <http://bugs.python.org/issue28