I am having a hard time in finding out how to retrieve information
about
the *size* of files I want to download from an FTP site. Should I
send a QUOTE SIZE command to the ftp server or is there an easier way?
TIA,
Michele Simionato
--
http://mail.python.org/mailman/listinfo/python
How about doing an 'ls -la' once you have connected to the server? That
returns a listing of the files with the size in bytes.
-Original Message-
From: Michele Simionato
I am having a hard time in finding out how to retrieve information about the
*size* of files I want to download from
Michele Simionato wrote:
> I am having a hard time in finding out how to retrieve information
> about the *size* of files I want to download from an FTP site. Should I
> send a QUOTE SIZE command to the ftp server or is there an easier way?
SIZE isn't a standard FTP command, so that only works fo
The Effbot wrote:
> here's a robust parser for various LIST output formats:
>
>http://cr.yp.to/ftpparse.html
>
> (google for "ftpparse" to find python bindings for that module)
Well, I have downloaded the one from your site (ftpparse-1.1-20021124)
and I have given a python setup.py install. No
Michele Simionato wrote:
> the README says "for a usage example, see the sanity.py test
> script" but there is not such a script in the distribution :-(
looks like a distutils glitch... try this one:
# $Id$
# minimal sanity check
import string
TESTS = [
"# examples taken from ftpparse.c",
Yes, it works fine, thanks (still I am a bit surprised there is not
ftpparse.py but only
an _ftpparse.so).
Michele Simionato
--
http://mail.python.org/mailman/listinfo/python-list