Return to Snippet

Revision: 17559
at September 9, 2009 17:15 by manatlan


Initial Code
# recupete le mtime d'un fichier
import os
file="c:\gce.png"
mtime = os.stat(file).st_mtime

# le transforme en time
import time
print time.localtime(mtime)

# le transforme en datetime
import datetime
print datetime.datetime.fromtimestamp(mtime)

Initial URL

                                

Initial Description

                                

Initial Title
file time datetime

Initial Tags
file, python

Initial Language
Python