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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,067
Latest member
HunterTere

Latest Threads

Top