Re: Caching of ftp connections
Yakov Lerner <[email protected]> Fri, 05 Mar 2004 22:27:53 +0200
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
Bram Moolenaar wrote: > 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 tried aap-latest.zip with python 2.2.2 under cygwin. I got error: > aap -f ftp://ftp.vim.org/pub/vim/runtime/main.aap "main.aap" exists, overwrite? (y/n) y Aap: Attempting download of "ftp://ftp.vim.org/pub/vim/runtime/main.aap" Aap: Error in recipe: Cannot download "ftp://ftp.vim.org/pub/vim/runtime/main.aap" to "main.aap": [Errno 2] No such file or directory: '/home/Administrator/.netrc' I did 'touch ~/.netrc' and aap proceeded without errors. Is it possible to avoid errors if ~/.netrc is not present ? Jacob > > 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. ------------------------------------------------------- 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