4
Add alies for python2 and python3 libs and fucntions.
7
if sys.version_info[0]== 3:
8
import http.client as httpclient
9
from urllib.parse import urlparse
11
"""Rename Python3 str to ustr"""
14
bytebuffer = memoryview
18
elif sys.version_info[0] == 2:
19
import httplib as httpclient
20
from urlparse import urlparse
22
"""Rename Python2 unicode to ustr"""
27
read_input = raw_input
30
raise ImportError("Unknown python version:{0}".format(sys.version_info))