Skip to content

Instantly share code, notes, and snippets.

@renyi
Created January 4, 2012 04:23
Show Gist options
  • Save renyi/1558477 to your computer and use it in GitHub Desktop.
Save renyi/1558477 to your computer and use it in GitHub Desktop.
python urlencode/urldecode
import urllib2
def urlencode(s):
return urllib2.quote(s)
def urldecode(s):
return urllib2.unquote(s).decode('utf8')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment