擅长:python、mysql、java
<p>我建议您编写自己的urlencode函数。下面是一个基本示例:</p>
<pre><code>params = {"startkey":"Mexico","endkey":"Mexico"}
def myencode(params):
return "&".join(['%s="%s"' %(key,value) for key,value in params.iteritems()])
print myencode(params)
## chaouche@karabeela ~/CODE/TEST/PYTHON $ python test_exec_minimal2.py
## startkey="Mexico"&endkey="Mexico"
## chaouche@karabeela ~/CODE/TEST/PYTHON $
</code></pre>