def download(url):
    """输入文件url，下载该文件"""
    file_name = os.path.split(url)[1]
    file = urlopen(url)
    with open(file_name, 'wb') as f:
        f.write(file.read())
        print("文件下载成功：%s " % file_name)
def download ( url ) : file_name = os . path . split ( url ) [ 1 ] file = urlopen ( url ) with open ( file_name , 'wb' ) as f : f . write ( file . read ( ) ) print ( "文件下载成功：%s " % file_name )
输入文件url，下载该文件