Type Error when running Tkinter tutorial's hello2.py example
Thomas Wouters
thomas at xs4all.nl
Thu May 27 06:50:42 EDT 1999
On Thu, May 27, 1999 at 10:27:16AM +0000, tlng at phileo.com.my wrote:
> Hi! I going through the draft Tkinter tutorial from Pythonware.com, and
> I'm trying to run its hello2.py example program:-
> class App:
> def _init_(self, master):
You need
def __init__(self, master):
Double underscores ('underbars') on each side of 'init'. This goes for all
the magically-called functions, by the way.
> File "F:\PALRES~1\PALDIR~1\DEVELO~1\test.py", line 19, in ?
> app = App(root)
> TypeError: this constructor takes no arguments
--
Thomas Wouters <thomas at xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
More information about the Python-list
mailing list