cannot urllib.urlencode a URL in python -


why getting error when trying urlencode string

 >>> callback = "http://localhost/application/authtwitter?twittercallback"  >>> urllib.urlencode(callback)  traceback (most recent call last):       file "<stdin>", line 1, in <module>       file "/usr/lib/python2.7/urllib.py", line 1261, in urlencode       raise typeerror  typeerror: not valid non-string sequence or mapping object 

that's not function does:

urlencode(query, doseq=0)     encode sequence of two-element tuples or dictionary url query string. 

are looking urllib.quote(callback)?


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -