This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kvander11
Recipients eb303, gpolo, kvander11
Date 2010-01-11.22:20:24
SpamBayes Score 2.5965512e-09
Marked as misclassified No
Message-id <1263248426.76.0.296167544508.issue4961@psf.upfronthosting.co.za>
In-reply-to
Content
I've also confirmed this one (by chance).  I'm on ubuntu linux, and I am seeing the problem in both 2.6 and 3.1, both using Tk 8.5.  I don't see the problem on my windows install (Vista, python 2.5, not sure of the Tk version right now).  But I did find a hack around this by explicitly creating and destroying a top level window following the askdirectory() dialog.  Try this snippet on linux/unix, the call to askyesno() returns False always.

import tkFileDialog,tkMessageBox,Tkinter
theDirectory=tkFileDialog.askdirectory()
addDirectory=tkMessageBox.askyesno('a dialog','Add a directory?')
print addDirectory


But the following works fine:

import tkFileDialog,tkMessageBox,Tkinter
toplevel=Tkinter.Tk()
theDirectory=tkFileDialog.askdirectory()
toplevel.destroy()
addDirectory=tkMessageBox.askyesno('a dialog','Add a directory?')
print addDirectory
History
Date User Action Args
2010-01-11 22:20:26kvander11setrecipients: + kvander11, gpolo, eb303
2010-01-11 22:20:26kvander11setmessageid: <1263248426.76.0.296167544508.issue4961@psf.upfronthosting.co.za>
2010-01-11 22:20:25kvander11linkissue4961 messages
2010-01-11 22:20:24kvander11create