how to determine file size in python

Wojtek Walczak gminick at hacker.pl
Fri Feb 14 07:56:16 EST 2003


Dnia Fri, 14 Feb 2003 07:12:31 -0500, Xiaoming Zeng napisał(a):
> New to python. Is there a method for determine the size of a file?
Method getsize from os.path module:

>>> import os.path
>>> os.path.getsize('/etc/passwd')
793L
>>>

-- 
[ ] gminick (at) underground.org.pl  http://gminick.linuxsecurity.pl/ [ ]
[ "Po prostu lubie poranna samotnosc, bo wtedy kawa smakuje najlepiej." ]




More information about the Python-list mailing list