Created
June 23, 2009 22:33
-
-
Save yaph/134894 to your computer and use it in GitHub Desktop.
create a query string from a dictionary (pquery) as returned from cgi.parse_qs / urlparse.parse_qs when urllib.urlencode is not appropriate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create a query string from a dictionary (pquery) as returned from | |
# cgi.parse_qs / urlparse.parse_qs when urllib.urlencode is not appropriate | |
query_string = '&'.join( | |
'='.join([key, pquery[key][0]]) for key in pquery | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment