tags:

views:

478

answers:

2

Okay so a bit of forward:

We have a service/daemon written in python that monitors remote ftp sites. These sites are not under our command, some of them we do NOT have del/rename/write access, some also are running extremely old ftp software. Such that certain commands do not work. There is no standardization among any of these ftp's, and they are out of our control(government).

About a year ago i wrote a ftp wrapper library for in house that basically adds in stuff like resume upload/resume download/verifying files are not currently being written to, etc. The problem is we soon found out is that due to so many of the ftp servers running werid/non standard software we were constantly fighting with the wrapper library/ftplib.

Basically I've given up on ftplib. Is there an alternative? I've looked at most of the ftp alternatives all of them are missing one or another key component of functionality.

What ever the choice is, it must run for python 2.5.2 (we cannot change). and must run on Linux/Windows/HP-UX.

Update:

Sorry i forgot to tell you alternatives i looked at:

  1. ftputil, problem is it does not support resume upload/download and stuff like partially downloading files given an offset.
  2. Pycurl looked good, i'll look at it again.
+1  A: 

You may have better luck with one of the cURL bindings such as pycURL.

Dana the Sane
+1  A: 

You don't mention which alternatives you've looked at already. Is ftputil one of them?

http://ftputil.sschwarzer.net/trac/wiki/Documentation

If you're trying to code around edge cases from various server implementations, you might be better off looking at the code used by Mozilla/Firefox. I imagine this is one of the things they have to deal with constantly.

ars