File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 2727from shutil import which
2828import ctypes
2929import string
30+ import datetime
3031
3132# Import QT libraries
3233from PySide6 .QtCore import Qt , QSettings
@@ -300,7 +301,10 @@ def runCommand(self, commandParts):
300301 return ('' , '' , - 1 , False )
301302
302303 def addOutputText (self , textString ):
303- self .textEdit_output .setText (f"{ self .textEdit_output .toPlainText ()} { textString } \n " )
304+ timestamp = datetime .datetime .now ()
305+ # format into year/month/day, hour/minute/second
306+ formattedTimestamp = timestamp .strftime ("%Y-%m-%d %H:%M:%S" )
307+ self .textEdit_output .setText (f"{ self .textEdit_output .toPlainText ()} { formattedTimestamp } : { textString } \n " )
304308 self .textEdit_output .repaint ()
305309 self .textEdit_output .moveCursor (QtGui .QTextCursor .End )
306310
You can’t perform that action at this time.
0 commit comments