Caching of ftp connections
Bram Moolenaar <[email protected]> Thu, 04 Mar 2004 21:06:23 +0100
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
Jacob Lerner complained about ftp download not working with Python 1.5.
After some debugging I narrowed it down to urlretrieve() not using a
passive connection. I'm not 100% sure but it looks like using a passive
connection solved the problem (obtaining the Vim runtime files).
While I was changing the ftp code anyway, I implemented an item from the
todo list: Keep an ftp connection open instead of re-opening it for
every upload and download. This should speed up ftp transfer of small
files considerably.
However, the network code is complicated, I cannot oversee all the side
effects of using ftplib instead of urllib. Please try out the new
version. For now I only checked it into CVS. A zip archive is
available here: http://www.a-a-p.org/files/aap-latest.zip
I wonder if the setting for passive mode should be made available to the
recipe writer. Googling I find a remark that it should be set
automatically depending on the server, but I don't know how.
--
[Another hideous roar.]
BEDEVERE: That's it!
ARTHUR: What?
BEDEVERE: It's The Legendary Black Beast of Aaaaarrrrrrggghhh!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click