def output(self, out_text, exit_code):
# print the output in the text_output widget (QTextEdit)
# success
if exit_code==0:
self.text_output.append( '<b>' + time.strftime("%H:%M:%S", time.localtime()) + '</b> - ' + out_text + ' [<font color="#00aa00">Success</font>]')
# failure
else:
self.text_output.append( '<b>' + time.strftime("%H:%M:%S", time.localtime()) + '</b> - ' + out_text + ' [<font color="#ff0000">Failure</font>]')
#
# Print the output in the GUI with a timestamp but without exit_code
# this function should be used instead of other form of output printing
#
评论列表
文章目录