Solver, View: Add some comment.

This commit is contained in:
Pierre-Antoine Rouby committed 2023-09-12 10:42:51 +02:00
1 parent bb6292ce90
commit 8004fbcdcc
3 files changed
+9 -1

No files matched your search

+4
View File
@@ -92,7 +92,9 @@ class ReplWindow(ASubMainWindow, ListedSubWindow):
self.set_plaintext_edit_text("plainTextEdit", "")
self._history_ind = 0
# Code to rich_code
rich_code = code.strip().split("\n")
# Add return variable for results display at last row
rich_code[-1] = "self.__debug_exec_result__ = " + rich_code[-1]
rich_code = "\n".join(rich_code)
logger.debug(f"User debug command : {rich_code}")
@@ -102,6 +104,8 @@ class ReplWindow(ASubMainWindow, ListedSubWindow):
except Exception as e:
value = f"<font color=\"red\">" + str(e) + "</font>"
# Display code
msg = f"<font color=\"grey\"> # " + code + " #</font>"
self.find(QTextEdit, "textEdit").append(msg)
# Display results
self.find(QTextEdit, "textEdit").append(str(value))