Skip to content

Instantly share code, notes, and snippets.

@wenshn902
wenshn902 / ftp2.py
Created October 28, 2012 13:54
ftp use pyrhon
# -*- coding: cp936 -*-
__author__ = 'wenshn902'
import string
from ftplib import FTP
bufsize=1024
def Get(filename):
command='RETR '+filename
ftp.retrbinary(command,open(filename,'wb').write,bufsize)
print 'download successfully'
def Put(filename):