def error_message(msg, parent=None, title=None):
 dialog = gtk.MessageDialog(parent=None, type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK, message_format=msg)
 if (parent is not None):
  dialog.set_transient_for(parent)
 if (title is not None):
  dialog.set_title(title)
 else:
  dialog.set_title(u'Error!')
 dialog.show()
 dialog.run()
 dialog.destroy()
 return None

def error_message ( msg , parent = None , title = None ) : dialog = gtk . MessageDialog ( parent = None , type = gtk . MESSAGE_ERROR , buttons = gtk . BUTTONS_OK , message_format = msg ) if ( parent is not None ) : dialog . set_transient_for ( parent ) if ( title is not None ) : dialog . set_title ( title ) else : dialog . set_title ( u'Error!' ) dialog . show ( ) dialog . run ( ) dialog . destroy ( ) return None
create an error message dialog with string msg .