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
import ctypes
ctypes.windll.user32.MessageBoxW(0, "Your text", "Your title", 1)
The last number (here 1) can be change to change window style (not only buttons!):
## Button styles:
# 0 : OK
# 1 : OK | Cancel
# 2 : Abort | Retry | Ignore
# 3 : Yes | No | Cancel
# 4 : Yes | No
# 5 : Retry | No
# 6 : Cancel | Try Again | Continue
## To also change icon, add these values to previous number
# 16 Stop-sign icon
# 32 Question-mark icon
# 48 Exclamation-point icon
# 64 Information-sign icon consisting of an 'i' in a circle
For example,
ctypes.windll.user32.MessageBoxW(0, "That's an error", "Warning!", 16)
will give this: