Use message to alert an Exception : Exception Dialog : GUI Tk PYTHON examples


PYTHON examples » GUI Tk » Exception Dialog »

 

Use message to alert an Exception


Use message to alert an Exception

from Tkinter import *
import tkMessageBox
       
def a():       
    filename = "a.txt"
    try:
        fp = open(filename)
    except:
        tkMessageBox.showwarning(
            "Open file",
            "Cannot open this filen(%s)" % filename
        )
        return
a()

           
       



    Related Scripts with Example Source Code in same category :

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo GUI Tk
» Exception Dialog