mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Solver, View: Add some comment.
This commit is contained in:
1 parent
bb6292ce90
commit
8004fbcdcc
3 files changed
+9
-1
No files matched your search
@@ -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))
|
||||
Reference in new issue
Block a user