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)
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to