[newbie] problem trying out simple non object oriented use of Tkinter
jeanmichel at sequans.com
Fri Dec 6 13:33:05 CET 2013
----- Original Message -----
> I'm trying out Tkinter with the (non object oriented) code fragment
> It works partially as I expected, but I thought that pressing "1"
> cause the program to quit, however I get this message:
> TypeError: quit() takes no arguments (1 given), I tried changing quit
> to quit()
> but that makes things even worse. So my question: can anyone here
> help me
> debug this?
> #!/usr/bin/env python
> import Tkinter as tk
> def quit():
> root = tk.Tk()
> label = tk.Label(root, text="Hello, world")
> label.bind("<1>", quit)
> p.s. I like the code not object orientated
the engine is probably passing an argument to your quit callback method.
You probably don't even care about the parameter:
-- IMPORTANT NOTICE:
The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
More information about the Python-list