replace ftp by local copy

  • Follow


I have been given an old python application that calls ftplib in many
places to copy files to a remote server.

I have been given the task of cloneing this code so that ftp is not
used, but files are just copied locally in a scenerio where ftp is not
available. The code is not well structured which makes this more
difficult.

Before starting this just wondered if anyone has previously done
anything like overriding the ftplib module so that I can leave the
existing code largely unchanged but have the ftp commands just copy
files locally?

Just thought I'd ask before getting started.




0
Reply jldunn2000797 (48) 2/16/2009 12:59:32 PM

loial wrote:
> I have been given an old python application that calls ftplib in many
> places to copy files to a remote server.
> 
> I have been given the task of cloneing this code so that ftp is not
> used, but files are just copied locally in a scenerio where ftp is not
> available. The code is not well structured which makes this more
> difficult.
> 
> Before starting this just wondered if anyone has previously done
> anything like overriding the ftplib module so that I can leave the
> existing code largely unchanged but have the ftp commands just copy
> files locally?
> 
> Just thought I'd ask before getting started.
> 
I don't remember anyone mentioning this, but it sounds like the soundest
engineering approach, and the one least likely to induce breakage ...

regards
 Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/

0
Reply steve73 (4801) 2/16/2009 7:45:21 PM


1 Replies
9 Views

(page loaded in 0.06 seconds)


Reply: