Eric Brunel wrote:
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?

bugs.python.org

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to