How to find size of file?

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?

Advertisements

Walter Huf wrote:
> 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?
>>> import os
>>> os.stat("c:/tmp/x.html").st_size
567L

Advertisements

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--
>
> 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! =-----

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!