파이썬에서 파일의 수정 날짜/시간을 어떻게 얻습니까? [복제하다
문제
이 질문은 이미 여기에 답이 있습니다.
파이썬에서 파일의 수정 날짜/시간을 어떻게 얻습니까?
해결책
os.path.getmtime(filepath)
또는
os.stat(filepath).st_mtime
다른 팁
형성 :
import time
print time.strftime("%m/%d/%Y %I:%M:%S %p",time.localtime(os.path.getmtime(fname)))
제휴하지 않습니다 StackOverflow