1#from PyQt4.QtGui import QMessageBox

2 from PyQt5.QtWidgets import *

3

4 def show_error_message(message, parent):

5 """

6 """

7 msg = QMessageBox(parent)

8 msg.setIcon(QMessageBox.Critical)

9 msg.setInformativeText(message)

10 msg.setWindowTitle("Error")

11 msg.setStandardButtons(QMessageBox.Ok)

12 retval = msg.exec_()

13

14 def c_bool(value):

15 if value == 'true':

16 return True

17 return False

18

19 def bool_c(value):

20 if value:

21 return 'true'

22 return 'false'