Returning a value from a Tk dialog

Gordon Airporte JHoover at fbi.gov
Mon Nov 7 20:24:47 EST 2005


The dialogs in tkColorChooser, tkFileDialog, etc. return useful values 
from their creation somehow, so I can do stuff like this:

filename = tkFileDialog.askopenfilename( master=self )

I would like to make a Yes/No/Cancel dialog that can be used the same 
way (returning 1/0/-1), but I just cannot figure out how to do it. At 
best I've been able to get some kind of instance id from the object. How 
does this work?



More information about the Python-list mailing list