Create an error Dialog in Blender

i got a problem, i need to let a error dialog to come up when something happens with python

i just found this artikle : http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Cookbook/Code_snippets/Interface#An_error_dialog but i dont really understand the code, i just need to put an simple error dialog on the screen, this may be the an example :

if …
then let the pop up with this message come up : " … "
else …

If it’s in an operator, use self.report({‘ERROR’}, “Your error message”)

otherwise refrain from creating a popup, it’s against Blender’s UI concept.

You may print to system console if necessary.