首页 > 编程语言 > 详细

python学习笔记 (二)

时间:2015-10-16 13:06:33      阅读:185      评论:0      收藏:0      [点我收藏+]

The urllib and urllib2 Modules

For simple downloads, urllib is quite all right. If you need HTTP authentication or cookies, or you want to write extensions to handle your own portocols, then urllib2 might be the right choice for you.

The urlopen function gives you a file-like object you can read from. If you would rather have urllib take care of downloading the file for you, storing a copy in a local file, you can use urlretrieve instead. 

 

 

doctest , unittest 

"Make it work, make it better, make it faster" : The unit testing helped make it work; source code checking can make it better; and, finally, profilling can help make it faster.

source code checking with PyChecker and PyLint

python学习笔记 (二)

原文:http://www.cnblogs.com/linxd/p/4884813.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!