python2:
from urllib import urlretrieve
python3:
from urllib.request import urlretrieve
本文介绍了如何在Python 2及Python 3中使用标准库进行网络资源的下载。通过简单的示例代码,展示了不同版本间模块调用的区别。
python2:
from urllib import urlretrieve
python3:
from urllib.request import urlretrieve

被折叠的 条评论
为什么被折叠?