TkMessageBox - Using sys.exit() is a a great pain. Looking for other similar commands.

dudeja.rajat at gmail.com dudeja.rajat at gmail.com
Mon Sep 1 14:35:23 EDT 2008


Hi,

I'm using a TkMessageBox for handling some errors and displaying them
through the message boxes.

My code is as below:
if selectedVer == strNoArchivedResults:
                    tkMessageBox._show("Error", \
                                       type='ok', icon='error', \
                                       message="Cannot perform Results
Comparison as no results are currently archived for this library")
                   sys.exit()

This message box is displayed when the above comdition is met:
Using sys.exit() is a great pain since this closes my parent GUI ( the
main GUI).

Please suggest some other way around.


Thanks and regards,
Rajat



More information about the Python-list mailing list