tkMessagebox.askyesno always returns False

James Stroud jstroud at ucla.edu
Wed Jun 21 18:41:55 EDT 2006


peter wrote:
> I have a weird problem in some code I am writing.  The user selects a
> number of files from a list and then can select an option which will
> rename the selected files.  Before the process starts, a yes/no dialog
> box pops up just to confirm.
> 
> Most of the time this works fine, but occasionally it seem the dialog
> box gets into a state where it always returns False, irrespective of
> the button clicked.
> 
> I must be doing something wrong, but I just can't see it!  Any
> suggestions?
> 
> <code>
> 
> import tkMessageBox as mb
>          :
>          :
>         if action=='Rename':
>             yn=mb.askyesno(file_list[0],'Ok to rename %d selected
> file(s)' % file_count)
>             print 'Response: ',yn # Debug only
>             if not yn: exit_flag=1
> 
> </code>
> 

This problem seems to be beyond the code you provide. Is this part of a 
larger program? Is it possible to show the entire script?

James

-- 
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/



More information about the Python-list mailing list