How to get the size of a file?

Andrew Dalke adalke at mindspring.com
Sun Oct 17 05:43:32 CEST 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