The simple code has been a used with one of the functions that "tkMessageBox" provides (for a little bit more of information you can go to the next link : Python Tkinter tkMessageBox; or this other one for the code of the message box of the first image in this post)
Anyway, this is the simple code (a warning will be shown when the user clicks the button that says "Warning"):
import Tkinter as tk
import tkMessageBox
root = tk.Tk()
def info():
tkMessageBox.showwarning("Warning", "Resources changed")
tk.Button(root, text = "Pop up", command = info).pack()
root.mainloop()