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
Published on 27-Dec-2017 11:51:21
Advertisements