tags:

views:

398

answers:

2

Heyas

So I know about ftplib, but that's a bit too low for me as it still requires me to handle uploading files one at a time as well as determining if there are subdirectories, creating the equivalent subdirectories on the server, cd'ing into those subdirectories and then finally uploading the correct files into those subdirectories. It's an annoying task that I'd rather avoid if I can, what with writing tests, setting up test ftp servers etc etc..

Any of you know of a library (or mb some code scrawled on the bathroom wall..) that takes care of this for me or should I just accept my fate and roll my own?

Thanks

+7  A: 

The ftputil Python library is a high-level interface to the ftplib module.

Looks like this could help. ftputil website

Deinumite
Excellent.. there's a script there called ftp_sync that isn't part of the standard ftputil install, but it does exactly what I was looking for. Thanks!
Silfheed
+3  A: 

If wget is installed on your system, you could have your script call it to do the ftp'ing for you. It supports recursive transfers, site mirroring, and many other features.

eataTREE
not python but it works :)
Andrew Cox
I know about wget, but I have more of a problem uploading whole directories to remote servers than retrieving directories. I just googled wput, but it's not installed on the server.
Silfheed