Skip to content

Instantly share code, notes, and snippets.

@matteomattei
Last active December 9, 2015 11:09
Show Gist options
  • Save matteomattei/b2205a6b480b5a9faa8e to your computer and use it in GitHub Desktop.
Save matteomattei/b2205a6b480b5a9faa8e to your computer and use it in GitHub Desktop.
Very simple graphical messagebox in Python useful for console applications with py2exe
import sys
if sys.version_info < (3,0):
import Tkinter as tkinter
import tkMessageBox as mbox
else:
import tkinter
import tkinter.messagebox as mbox
window = tkinter.Tk()
window.wm_withdraw()
mbox.showinfo('my app','my message')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment