How to get the size of a file?

Andrew Dalke adalke at mindspring.com
Sat Oct 16 23:43:32 EDT 2004


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



More information about the Python-list mailing list