Files
CollectMangaInfo/UtilPack.py
Lee Young Hoon cc02151899 utility class added
자료 저장 구조 고민중...
2024-04-08 01:33:15 +09:00

39 lines
834 B
Python

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)