[英]How to download a file with cgi/python?
I have working with cgi/python. 我正在使用cgi / python。 I want to ask a question as below:
我想问一个如下问题:
How to download a file with cgi/python? 如何使用cgi / python下载文件?
I want when a page is loading then a file which specified in url will be downloaded. 我想在页面加载时下载url中指定的文件。
I have googled in many days but can't until resolve this problem. 我已经用Google搜索了很多天,但是直到解决了这个问题。
Anyone help me, Many Thanks. 有人帮助我,非常感谢。
import urllib
urllib.urlretrieve(url, filename)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.