How to check file last access time using Python?

PythonServer Side ProgrammingProgramming

For getting the modification time for a file, you can use the os.path.getmtime(path). It is supported cross-platform.

example

>>> import os
>>> print os.path.getmtime('my_file.txt')
1505928275.3081832
raja
Updated on 18-Feb-2020 06:13:58

Advertisements