Hello,
I start learning Python GUI using Tkinter
as IDE I'm using wing IDE 2.0.3 trial.
I'm using Tkinter mainly because of very good debugger.
Belive it or not I get exception in this code:
from Tkinter import *
root = Tk ( )
my_container = Frame ( root )
Exception is generated in file Tkinter.py in line:
def __getattr__(self, attr):
"Delegate attribute access to the interpreter object"
return getattr(self.tk, attr)
and Exception message is:
AttributeError: __nonzero__
Traceback (innermost last):
File "c:\PythonProjects\GUILearning\SimpleGUI2.py", line 1, in ?
from Tkinter import *
File "c:\PythonProjects\GUILearning\SimpleGUI2.py", line 5, in ?
my_container = Frame(root)
File "C:\Python24\Lib\lib-tk\Tkinter.py", line 2374, in __init__
Widget.__init__(self, master, 'frame', cnf, {}, extra)
File "C:\Python24\Lib\lib-tk\Tkinter.py", line 1855, in __init__
BaseWidget._setup(self, master, cnf)
File "C:\Python24\Lib\lib-tk\Tkinter.py", line 1828, in _setup
if not master:
File "C:\Python24\Lib\lib-tk\Tkinter.py", line 1647, in __getattr__
return getattr(self.tk, attr)
However, if I just execute file everything seems to work, I tried in IDLE and there
are no exceptions there. What could that be, maybe it's an IDE bug?