From: Joshua Roesslein Date: Mon, 16 Apr 2012 20:57:41 +0000 (-0500) Subject: Implemnt an urlencode that uses quote instead. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=748c4e0ffe1f2cb45a7a110a1d35bcbbc8105175;p=tweepy.git Implemnt an urlencode that uses quote instead. --- diff --git a/tweepy/utils.py b/tweepy/utils.py index fbd090a..52c6c79 100644 --- a/tweepy/utils.py +++ b/tweepy/utils.py @@ -7,6 +7,7 @@ import time import htmlentitydefs import re import locale +from urllib import quote def parse_datetime(string): @@ -96,3 +97,7 @@ def list_to_csv(item_list): if item_list: return ','.join([str(i) for i in item_list]) +def urlencode_noplus(query): + return '&'.join(['%s=%s' % (quote(str(k)), quote(str(v))) \ + for k, v in query.iteritems()]) +