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


PYTHON examples » GUI Tk » 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()

           
       



Leave a Comment / Note


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


PYTHON examples

 Navioo GUI Tk
» Dialog