John Salerno johnjsal at NOSPAMgmail.com
Thu Jun 26 22:30:04 CEST 2008

"ianitux" <ianklaric at gmail.com> wrote in message 
news:ddbcbb13-053b-4a9b-bc5e-2929db5d7161 at l64g2000hse.googlegroups.com...
>> and see if that works? I'm not sure if quote() will convert the %20 into 
>> +,
>> though, but it may.
> This is what quot do.
>>>> import urllib
>>>> u = urllib
>>>> u.quote(u.urlencode({'page': 'i', 'order': 'desc', 'style': 'flex 
>>>> power'}))
> 'style%3Dflex%2Bpower%26page%3Di%26order%3Ddesc'

I know quote will convert spaces to %20, just wasn't sure if it would 
explicitly convert + to %20.

But it seems the output isn't what the OP wants anyway, because he wanted 
the & and = symbols. 

More information about the Python-list mailing list