Salve a tutti,
sto iniziando a studiarmi Tkinter da alcune risorse in rete.
Premetto che sto facendomi le ossa con Python ver. 3.1.3 su
piattaforma Windows Xp.
Il seguente esempio ha un funzionamento anomalo e non capisco perche':
se premo 'hello' funziona correttamente,
se premo QUIT il prompt viene restituito nella shell ma la finestra di
Tk si blocca:
from tkinter import *
class App:
def __init__(self, master):
frame = Frame(master)
frame.pack()
self.button = Button(frame, text=QUIT, fg=red, command=frame.quit)
self.button.pack(side=LEFT)
self.hi_there = Button(frame, text=Hello, command=self.say_hi)
self.hi_there.pack(side=LEFT)
def say_hi(self):
print(hi there, everyone!)
root = Tk()
app = App(root)
root.mainloop()
avete idea del motivo?
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python