Files
web2py/gluon/messageboxhandler.py
2012-08-25 11:29:11 -05:00

18 lines
325 B
Python

import logging
try:
import tkMessageBox
except:
tkMessageBox = None
class MessageBoxHandler(logging.Handler):
def __init__(self):
logging.Handler.__init__(self)
def emit(self, record):
if tkMessageBox:
msg = self.format(record)
tkMessageBox.showinfo('info1', msg)