Could someone show me how I could return a value from a wxPython Frame? When the use clicks close, I popup a message dialog asking him a question. I would like to return the return code of this message dialog to my calling function.
Thanks
I don't think a wxFrame can return a value since it is not modal.  If you don't need to use a wxFrame, then a modal dialog could work for you.  If you really need a frame, I'd consider using a custom event.  
It would go something like this:
(1) User clicks to close the wxFrame
(2) You override OnClose (or something like that) to pop up a dialog to ask the user a question
(3) Create and post the custom event
(4) Close the wxFrame
(5) Some other code processes your custom event
Return value from wxPython Frame