How to display an "error message" from python (2.49)

I’m writing a python script using blender as a GUI and want to display an error message, but not on the console, more like the error message you get dsiplayed in the GUI when a script goes wrong that says “Check Console” (but a custom one in my case…)

Is there a way to do that?

I’ve scanned the blender python docs an number of times and can’t see any method / function for it.

msg = “Error: you need a full Python install to run this script.”