About the Tutorial



Download 2,85 Mb.
Pdf ko'rish
bet206/234
Sana28.05.2022
Hajmi2,85 Mb.
#614232
1   ...   202   203   204   205   206   207   208   209   ...   234
Bog'liq
python3 tutorial 060821094426

Return Value 
This method returns either True or False. 
Example 
The following example shows the usage of stat_float_times() method. 
#!/usr/bin/python3 
import os, sys 
# Stat information 
statinfo = os.stat('a2.py') 
print (statinfo) 
statinfo = os.stat_float_times() 
print (statinfo) 
When we run the above program, it produces the following result- 


Python 3 
309 
os.stat_result(st_mode=33206, 
st_ino=562949953508433, 
st_dev=1017554828, 
st_nlink=1, 
st_uid=0, 
st_gid=0, 
st_size=27, 
st_atime=1455597032, 
st_mtime=1455597032, st_ctime=1455562995) 
True 
os.statvfs() Method 
Description 
The method statvfs() perform a statvfs system call on the given path. 
Syntax 
Following is the syntax for statvfs() method- 
os.statvfs(path) 
Parameters 
path
- This is the path, whose statvfs information is required. 
Return Value 
Here is the list of members of statvfs structure- 

f_bsize: preferred file system block size. 

f_frsize: fundamental file system block size. 

f_blocks: total number of blocks in the filesystem. 

f_bfree: total number of free blocks. 

f_bavail: free blocks available to non-super user. 

f_files: total number of file nodes. 

f_ffree: total number of free file nodes. 

f_favail: free nodes available to non-super user. 

f_flag: system dependent. 

f_namemax: maximum file name length. 
Example 
The following example shows the usage of statvfs() method. Availabe on Unix like 
systems- 
# !/usr/bin/python3 
import os, sys 
# showing statvfs information of file "a1.py" 
stinfo = os.statvfs('a1.py') 


Python 3 
310 
print (stinfo) 
When we run the above program, it produces the following result- 
posix.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=1909350L, 
f_bfree=1491513L, 
f_bavail=1394521L, f_files=971520L, f_ffree=883302L, f_fvail=883302L, f_flag=0, 
f_namemax=255) 

Download 2,85 Mb.

Do'stlaringiz bilan baham:
1   ...   202   203   204   205   206   207   208   209   ...   234




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish