How to get the size of a file?

User 1 at 2.3
Sun Oct 17 00:00:00 EDT 2004


On Sun, 17 Oct 2004 03:43:32 GMT, Andrew Dalke <adalke at mindspring.com>
wrote:

>User wrote:
>> Anyone have ideas which os command could be used to get the size of a
>> file without actually opening it?
>
> >>> os.path.getsize("/etc/passwd")
>722L
> >>>
>
>				Andrew
>				dalke at dalkescientific.com

That works.  Thanks.  I didn't think to look there for it.



More information about the Python-list mailing list