File object question

mrmakent at cox.net mrmakent at cox.net
Thu Dec 22 16:20:50 EST 2005


See http://www.python.org/doc/2.4.2/lib/os-file-dir.html for the 'stat'
function

import os
os.stat(path).st_size

This will return the size in bytes of the file designated by 'path'.




More information about the Python-list mailing list