replace ftp by local copy

L

loial

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.
 
S

Steve Holden

loial said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top