Python:ファイルのtimestampを取得する
実装例
import os
# epoch(Unixtime)がfloat型で返却される
os.path.getmtime('ファイルパス')
参考
10.1. os.path — 共通のパス名操作
https://docs.python.org/ja/2.7/library/os.path.html#os.path.getmtime
import os
# epoch(Unixtime)がfloat型で返却される
os.path.getmtime('ファイルパス')
10.1. os.path — 共通のパス名操作
https://docs.python.org/ja/2.7/library/os.path.html#os.path.getmtime
©2025 森羅万象テーブル