[Twisted-Python] URL encoding

Drew Smathers drew.smathers at gmail.com
Mon Mar 24 11:42:13 EDT 2008

On Mon, Mar 24, 2008 at 11:20 AM, Vasil Vangelovski
<vvangelovski at gmail.com> wrote:
> urllib.quote is useless as is
>  >>> urllib.quote('http://www.example.com/part1 part2.html')
>  'http%3A//www.example.com/part1%20part2.html
>  and from what I understand urllib.urlencode is for encoding query parameters.

You want to quote only everything after "http://".  ':' is valid only
to delimit the schema from the URI - so the quoting is correct.


More information about the Twisted-Python mailing list