Latest web development tutorials

os.stat_float_times python3 méthode ()

Python3 OS méthodes fichier / répertoire Python3 OS méthodes fichier / répertoire


contour

os.stat_float_times () méthode utilisée pour décider de flotter des objets stat_result affichage horodatages.

grammaire

stat_float_times () Syntaxe de la méthode est la suivante:

os.stat_float_times([newvalue])

Paramètres

  • newvalue - Si vrai, appel stat () flotteurs de retour, si elle est fausse, ints de retour d' appel stat.Sans ce paramètre renvoie le réglage actuel.

Valeur de retour

Renvoie Vrai ou Faux.

Exemples

L'exemple suivant montre stat_float_times () mode d'emploi:

#!/usr/bin/python3

import os, sys

# Stat 信息
statinfo = os.stat('a2.py')

print (statinfo)
statinfo = os.stat_float_times()
print (statinfo)

La sortie du programme ci-dessus est:

posix.stat_result(st_mode=33188, st_ino=3940649674337682L, st_dev=277923425L, 
st_nlink=1, st_uid=400, st_gid=401, st_size=335L, st_atime=1330498089, st_mtime=13
30498089, st_ctime=1330498089)
True

Python3 OS méthodes fichier / répertoire Python3 OS méthodes fichier / répertoire