unexplained behavior of tkMessageBox.askyesno
Peter Kleiweg
in.aqua.scribis at nl.invalid
Tue Sep 7 15:43:02 EDT 2004
Peter Kleiweg schreef:
> from Tkinter import *
> import tkFileDialog
> import tkMessageBox
>
> def openProject():
> filepath = tkFileDialog.askopenfilename(filetypes=(("project files","*.ini"), ("all","*")))
> if filepath:
> loadProject(filepath)
>
> def makeClean():
> if tkMessageBox.askyesno('Make clean', 'Remove all files created by Make?'):
> print 'yes'
> # more code
I changed the code to this:
def makeClean():
print tkMessageBox.askyesno('Make clean', 'Remove all files created by Make?')
If I have used openProject(), the function makeClean() always
prints 'False', no matter what I choose.
--
Peter Kleiweg L:NL,af,da,de,en,ia,nds,no,sv,(fr,it) S:NL,de,en,(da,ia)
info: http://www.let.rug.nl/~kleiweg/ls.html
The Halloween Documents: http://www.opensource.org/halloween/
More information about the Python-list
mailing list