[Tutor] FTP File Size
Tim Johnson
tim@johnsons-web.com
Sun, 17 Mar 2002 13:24:17 -0900
Hello:
* J=F6rg W=F6lke <lumbricus@gmx.net> [020317 10:39]:
> > 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.
>=20
> How much larger?
Just a few percent larger.
> What kind of ftp server?
Must ask domain hoster, but my guess is wu_ftpd, or FtpPro on
RH linux. The clients I'm using (Midnight Commander and IglooFTP)
are reporting correctly, I believe.
> If its open source, how does it determine the size?
=20
I'm using an object that inherits FTP from ftplib.=20
=3D> using the "original" (not overloaded) 'size' method.
I can send entire source if necessary.
> =20
> > What I have seen of RFC959 makes no mention of SIZE command,
> > and I see documentation in the standard distribution ftplib
> > as follows:
> > =20
> > " Note that the RFC doesn't say anything about 'SIZE'"
> > =3D=3D> line 454
>=20
> "http://www.python.org/doc/current/lib/ftp-objects.html":
>=20
> | size(filename)
> | Request the size of the file named filename on the server.=20
> | On success, the size of the file is returned as an integer,=20
> | otherwise None is returned. Note that the "SIZE" command=20
> | is not standardized, but is supported by many common server
> | implementations.
>=20
> > Can someone perhaps comment on this?
> > Are others seeing the same results?
> > Or am I doing something wrong.
> >=20
> > TIA
>=20
> HTH, HAND and
> Greetings, J"o!
=20
And thank you very much. :-)
> --=20
> $ make LOVE
> Make: Don't know how to make LOVE. Stop.
> $=20
=20
That's gcc for you...
>=20
> --=20
> GMX - Die Kommunikationsplattform im Internet.
> http://www.gmx.net
>=20
>=20
> _______________________________________________
> Tutor maillist - Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
--=20
Tim Johnson <tim@johnsons-web.com>
http://www.alaska-internet-solutions.com
http://www.johnsons-web.com