>>> import urllib
>>>
import
urllib
>>> a
=
"PythonTab中文网"
'PythonTab\xe4\xb8\xad\xe6\x96\x87\xe7\xbd\x91'
>>> urllib.quote(a)
'PythonTab%E4%B8%AD%E6%96%87%E7%BD%91'