Newbie Tkinter question
Fredrik Lundh
fredrik at effbot.org
Sun Jan 28 04:57:06 EST 2001
jerry keeney wrote:
> The problem is with self.button2. When this part of
> code is commented out, the program works. When I
> uncomment it out, like here: I get an invalid syntax
> error for
> self.button2.grid(row=1,column=1)
>
> What obvious thing am I missing here?
did you get "SyntaxError: invalid token" ?
in my mailer, that grid show statement shows up as:
self.button2 = Button(text="test", fg="red")
self.button2.grid(row=1,column=1)
which indicates that you should check your editor's tab/space
settings...
(statements belonging to the same block must be properly
aligned. also see:
http://www.python.org/doc/current/ref/indentation.html )
Cheers /F
More information about the Python-list
mailing list