How to find size of file?

Yermat loic at yermat.net1.nerim.net
Fri Mar 5 13:48:24 EST 2004


Walter Huf a écrit :

> Hi, I'm the same one with the CGI download problem. This time, however, I 
> want to send the client the size of the file that will be downloaded. How 
> would I find the size of the file, so I can include that in the headers? 
> 
> --Walter Huf--
> hufman at cobalty.com
> http://hufman.cobalty.com
> 
> 
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----==  Over 100,000 Newsgroups - 19 Different Servers! =-----

def sizeOf(f):
	f.seek(0,2)
	return f.tell()




More information about the Python-list mailing list