Skip to content

Instantly share code, notes, and snippets.

Created December 12, 2018 23:52
What would you like to do?
#!/usr/bin/env python3
import os
from time import sleep
FILE_PATH = 'ts.txt'
def get_atime_1():
result = os.stat(FILE_PATH, follow_symlinks = False)
return result.st_atime
def get_atime_2():
for entry in os.scandir('.'):
if == FILE_PATH.lower():
return entry.stat().st_atime
#print('Starting up...')
print(get_atime_1(), get_atime_2())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment