[Tutor] FTP File Size

Jörg Wölke lumbricus@gmx.net
Sun, 17 Mar 2002 20:18:27 +0100 (MET)


> Hello :
>     Using python 2.1 on RH 7.2 and win98.
>     I am finding that the ftp.size() command appears
>     to be returning a size for a file at a remote ftp site
>     consistanty larger than is actual.

How much larger?
What kind of ftp server?
If its open source, how does it determine the size?
 
>     What I have seen of RFC959 makes no mention of SIZE command,
>     and I see documentation in the standard distribution ftplib
>     as follows:
>     
>         " Note that the RFC doesn't say anything about 'SIZE'"
>         ==> line 454

"http://www.python.org/doc/current/lib/ftp-objects.html":

| size(filename)
| Request the size of the file named filename on the server. 
| On success, the size of the file is returned as an integer, 
| otherwise None is  returned. Note that the "SIZE" command 
| is not standardized, but is supported by many common server
| implementations.

>     Can someone perhaps comment on this?
>     Are others seeing the same results?
>     Or am I doing something wrong.
> 
>     TIA

HTH, HAND and
Greetings, J"o!

-- 
$ make LOVE
Make: Don't know how to make LOVE.  Stop.
$ 


-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net