Comment obtenir la date / heure modifiée d'un fichier en Python? [dupliquer]
Question
Cette question a déjà une réponse ici:
Comment obtenir la date / heure modifiée d'un fichier en Python?
La solution
os.path.getmtime(filepath)
ou
os.stat(filepath).st_mtime
Autres conseils
Formated:
import time
print time.strftime("%m/%d/%Y %I:%M:%S %p",time.localtime(os.path.getmtime(fname)))
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow