def set_file_mtime(path, mtime, atime=None):
  """Set access and modification times on a file."""
  if not atime:
    atime = mtime
  f = open(path, 'a')
  try:
    os.utime(path, (atime, mtime))
  finally:
    f.close()
def set_file_mtime ( path , mtime , atime = None ) : if not atime : atime = mtime f = open ( path , 'a' ) try : os . utime ( path , ( atime , mtime ) ) finally : f . close ( )
Set access and modification times on a file.