disksuage question, stat.py

Padraig at Linux.ie Padraig at Linux.ie
Mon Feb 3 07:12:06 EST 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