disksuage question, stat.py

Padraig at Linux.ie Padraig at Linux.ie
Mon Feb 3 13:12:06 CET 2003


I'm not exactly sure what you want, but I use the following
to get the disk usage of a file:

st = os.lstat(path) size=st.st_blksize*(st.st_blocks/(st.st_blksize/512))

Pádraig.





More information about the Python-list mailing list