def set_file_utime(filename, desired_time):
 try:
  os.utime(filename, (desired_time, desired_time))
 except OSError as e:
  if (e.errno != errno.EPERM):
   raise e
  raise SetFileUtimeError('The file was downloaded, but attempting to modify the utime of the file failed. Is the file owned by another user?')

def set_file_utime ( filename , desired_time ) : try : os . utime ( filename , ( desired_time , desired_time ) ) except OSError as e : if ( e . errno != errno . EPERM ) : raise e raise SetFileUtimeError ( 'The file was downloaded, but attempting to modify the utime of the file failed. Is the file owned by another user?' )
set the utime of a file .