Possible bug in Tkinter - Python 2.6
José Matos
jaomatos at gmail.com
Thu Jan 15 13:09:00 EST 2009
On Thursday 15 January 2009 15:28:36 r wrote:
> First of all be very careful using from "module" import * or you will
> have name conflicts. Tkinter is made to be imported this way and i do
> it all the time. for the others do.
>
> import tkMessageBox as MB
> import tkFileDialog as FD
> or whatever floats your boat.
Importing explicitly works for me in Fedora 11 (rawhide):
-----------------------------
from Tkinter import *
from tkMessageBox import askyesno
from tkFileDialog import askopenfilename
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()
-----------------------------
> Secondly i hear all the time about problems with fedora distros, so
> that would explain the issue to me.
That seems a long jump in the reasoning since OP reported the same behavior in
Suse and Solaris.
--
José Abílio
More information about the Python-list
mailing list