Re: Weird ttk behaviour

2013-09-17 Thread Chris Angelico
On Wed, Sep 18, 2013 at 2:11 AM, Rotwang wrote: > I don't know tkinter well enough either, but the fact that it behaves > differently on Linux and Windows suggests to me that at least one version is > bugging out. Do you think this is worth raising on bugs.python.org? Possibly, but I'd keep it he

Re: Weird ttk behaviour

2013-09-17 Thread Rotwang
On 17/09/2013 15:35, Chris Angelico wrote: On Wed, Sep 18, 2013 at 12:25 AM, Rotwang wrote: In fact, if I replace tkderp with this: # begin tkderp.py import tkinter as tk _root = tk.Tk() _root.withdraw() # end tkderp.py then simply importing tkderp before tkderp2 is enough to make the la

Re: Weird ttk behaviour

2013-09-17 Thread Chris Angelico
On Wed, Sep 18, 2013 at 12:25 AM, Rotwang wrote: > In fact, if I replace tkderp with this: > > > # begin tkderp.py > > import tkinter as tk > > _root = tk.Tk() > _root.withdraw() > > # end tkderp.py > > > then simply importing tkderp before tkderp2 is enough to make the latter > work properly Nic

Re: Weird ttk behaviour

2013-09-17 Thread Rotwang
On 17/09/2013 12:32, Chris Angelico wrote: [...] If reloading and doing it again makes things different, what happens if you simply trigger your code twice without reloading? I've no idea if it'll help, it just seems like an attack vector on the problem, so to speak. Thanks for the suggestion

Re: Weird ttk behaviour

2013-09-17 Thread Chris Angelico
On Tue, Sep 17, 2013 at 9:27 PM, Rotwang wrote: > On 16/09/2013 23:34, Chris Angelico wrote: >> >> On Tue, Sep 17, 2013 at 2:28 AM, Rotwang wrote: >>> >>> If I then uncomment those two lines, reload the module and call f() again >>> (by entering tkderp.reload(tkderp).f()), the function works like

Re: Weird ttk behaviour

2013-09-17 Thread Rotwang
On 16/09/2013 23:34, Chris Angelico wrote: On Tue, Sep 17, 2013 at 2:28 AM, Rotwang wrote: If I then uncomment those two lines, reload the module and call f() again (by entering tkderp.reload(tkderp).f()), the function works like it was supposed to in the first place: two warnings, no exception

Re: Weird ttk behaviour

2013-09-17 Thread Rotwang
On 16/09/2013 19:43, Serhiy Storchaka wrote: 16.09.13 19:28, Rotwang написав(ла): On Windows 7 (sys.version is '3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v.1600 64 bit (AMD64)]') there's no problem; f() works fine in the first place. Does anybody know what's going on? What _root.

Re: Weird ttk behaviour

2013-09-16 Thread Chris Angelico
On Tue, Sep 17, 2013 at 2:28 AM, Rotwang wrote: > If I then uncomment those two lines, reload the module and call f() again > (by entering tkderp.reload(tkderp).f()), the function works like it was > supposed to in the first place: two warnings, no exceptions. I can reload > the module as many tim

Re: Weird ttk behaviour

2013-09-16 Thread Serhiy Storchaka
16.09.13 19:28, Rotwang написав(ла): On Windows 7 (sys.version is '3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v.1600 64 bit (AMD64)]') there's no problem; f() works fine in the first place. Does anybody know what's going on? What _root.wantobjects() returns? -- https://mail.pytho

Weird ttk behaviour

2013-09-16 Thread Rotwang
Hi all, I've just started trying to learn how to use ttk, and I've discovered something that I don't understand. I'm using Python 3.3.0 in Linux Mint 15. Suppose I create the following module: # begin tkderp.py import tkinter as tk import tkinter.messagebox as _ from tkinter import ttk from