I'm looking for the same effect as alert() in JavaScript.
I wrote a simple web-based interpreter this afternoon using Twisted Web. You basically submit a block of Python code through a form, and the client comes and grabs it and executes it. I want to be able to make a simple popup message, without having to rewrite a whole bunch of boilerplate wxPython or Tkinter code every time (since the code gets submitted through a form and then disappears).
I've tried tkMessageBox
:
import tkMessageBox
tkMessageBox.showinfo(title="Greetings", message="Hello, World!")
but this opens another window in the background with the Tkinter icon. I don't want this. I was looking for some simple wxPython code, but it always required setting up a class and entering an application loop, etc. Isn't there a simple, catch-free way of making a message box in Python?