Macro MessageBox/it

=Creare box di Messaggi=

"""Show how to give information to the user in macros """ from PyQt4 import QtCore, QtGui def errorDialog(msg): # Create a simple dialog QMessageBox # The first argument indicates the icon used: one of QtGui.QMessageBox.{NoIcon, Information, Warning, Critical, Question} diag = QtGui.QMessageBox(QtGui.QMessageBox.Warning, 'Error in macro MessageBox', msg) diag.setWindowModality(QtCore.Qt.ApplicationModal) diag.exec_ msg = 'Example of warning message' errorDialog(msg) raise(Exception(msg))
 * 1) ! /usr/bin/env python
 * 2) -*- coding: utf-8 -*-