def urlencode_path(s):
 from urllib import quote
 safe = ((os.sep + (os.altsep or '')) + ':')
 return quote(s, safe=safe)

def urlencode_path ( s ) : from urllib import quote safe = ( ( os . sep + ( os . altsep or '' ) ) + ':' ) return quote ( s , safe = safe )
url-encode the given path string .