Possible bug in Tkinter - Python 2.6

Eric Brunel see.signature at no.spam
Thu Jan 15 05:30:00 EST 2009


Hi all,

I found a behaviour that might be a bug in Tkinter for Python 2.6. Here is  
the script:

-----------------------------
 from Tkinter import *
 from tkMessageBox import *
 from tkFileDialog import *

root = Tk()

def ask_file():
   file_name = askopenfilename()
   print file_name

def ask_confirm():
   answer = askyesno()
   print answer

Button(root, text='Ask file', command=ask_file).pack()
Button(root, text='Ask confirm', command=ask_confirm).pack()

root.mainloop()
-----------------------------

Scenario:
- Run the script.
- Click the 'Ask confirm' button and answer 'Yes'; it should print True,  
which is the expected answer.
- Click the 'Ask file' button, select any file and confirm.
- Click the 'Ask confirm' button and answer 'Yes'.

At the last step, the script prints 'False' for me, which is quite wrong.  
Can anybody confirm this?

I reproduced this problem on Linux Fedora Core 4 and Suse Enterprise  
Server 9, and on Solaris 8 for Sparc and Solaris 10 for Intel. However, it  
seems to work correctly on Windows 2000. I could only test with Python  
2.6, and not 2.6.1. But I didn't see any mention of this problem in the  
release notes.

And BTW, if this is actually a bug, where can I report it?

TIA
-- 
python -c "print ''.join([chr(154 - ord(c)) for c in  
'U(17zX(%,5.zmz5(17l8(%,5.Z*(93-965$l7+-'])"



More information about the Python-list mailing list