httplib —> http.client
python3把httplib改了名字,对应的库是http.client
https://docs.python.org/3.4/library/http.client.html
https://docs.python.org/2/library/httplib.html
thread模块
thread 模块已被废弃。用户可以使用 threading 模块代替。所以,在 Python3 中不能再使用”thread” 模块。为了兼容性,Python3 将 thread 重命名为 “_thread”
https://blog.csdn.net/xc_zhou/article/details/80604070
urlparse 模块
python2 中 urlparse 模块引入方式是:import urlparse
python3 中,取消了 urlparse,引用方式改为了:from urllib import parse
basestring —> str
python3 里已经没有basestring 类型,用str代替了basestring ;
StringIO
py2
import StringIO
py3
from io import StringIO