import os import time m_dbgLevel = 0 listDbgStr = [] # def IsEmptyStr(string): return 0 == len(string.strip()) # def GetCurrentTime(): # 현재 시간을 구하고 구조체로 변환 current_time_struct = time.localtime() # 구조체에서 연, 월, 일, 시간, 분, 초를 추출 year = current_time_struct.tm_year month = current_time_struct.tm_mon day = current_time_struct.tm_mday hour = current_time_struct.tm_hour minute = current_time_struct.tm_min second = current_time_struct.tm_sec strRet = (f"{year}/{month}/{day}_{hour}:{minute}:{second}") return strRet #for debug def DbgOut(str): strMsg = GetCurrentTime() +" : " + str listDbgStr.append(strMsg) print(strMsg) def printDbgMessages(): for line in listDbgStr: print(line)