Skip to content

Instantly share code, notes, and snippets.

Created December 12, 2018 23:52
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save msuhanov/74fd3c795883e0491277e6e27f2434e3 to your computer and use it in GitHub Desktop.
#!/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