Chinaunix首页 | 论坛 | 博客
  • 博客访问: 389915
  • 博文数量: 32
  • 博客积分: 6015
  • 博客等级: 准将
  • 技术积分: 1320
  • 用 户 组: 普通用户
  • 注册时间: 2005-03-06 21:06
文章分类

全部博文(32)

文章存档

2010年(11)

2009年(7)

2008年(14)

我的朋友

分类: Python/Ruby

2009-01-12 17:11:37

一个第三方包。很好的实现了 本地目录与ftp服务器的同步。
也许也能fxp,还没试过

- Download and install ftputil.

- Download the and put it into the site-packages/ftputil
directory.


import ftputil
from ftputil import ftp_sync

source = ftp_sync.LocalHost()
target = ftputil.FTPHost(hostname, username, password)
syncer = ftp_sync.Syncer(source, target)
syncer.sync(source_directory, target_directory)

阅读(1001) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~