[Tutor] tk help
Kirk Vander Meulen
kvander11 at gmail.com
Mon Jan 11 01:45:59 CET 2010
I'm working on a program partly to get the hang of gui programming. I'm a
bit puzzled by the behavior of simple dialogs- I wonder why, in the
following code, the second call to tkMessageBox.askyesno always returns
'False' (either 'yes' or 'no' return False!). If I take out the call to
tkFileDialog.askdirectory(), the second call works as expected
(yes->True,no->False). I would really appreciate if someone could take a
look at this and tell me what I'm missing. Thanks,
Kirk
import tkFileDialog,tkMessageBox
addDirectory=tkMessageBox.askyesno('a dialog','Add a directory?')
print(addDirectory)
theDirectory=tkFileDialog.askdirectory()
print(addDirectory)
print(theDirectory)
addDirectory=tkMessageBox.askyesno('a dialog','Add a directory?')
print(addDirectory)
print(theDirectory)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100110/3daa2b8d/attachment.htm>
More information about the Tutor
mailing list