RE: urldecode function?

2008-08-14 Thread Edwin . Madari
afraid not.. simple to create your own, NOTE that key words can be supplied more than once. Hence... import urllib def urldecode(query): d = {} a = query.split('&') for s in a: if s.find('='):

Re: urldecode function?

2008-08-14 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: is there a function that does the opposite of urllib.urlencode? for example urldecode('Cat=1&by=down&start=1827') returns a dictionary with {'Cat':1, 'by':'down','start':1827) the cgi modules contains a

urldecode function?

2008-08-14 Thread [EMAIL PROTECTED]
hi is there a function that does the opposite of urllib.urlencode? for example urldecode('Cat=1&by=down&start=1827') returns a dictionary with {'Cat':1, 'by':'down','start':1827) thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: urlDecode()

2007-03-01 Thread gert
On Mar 1, 1:40 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 28 Feb 2007 22:45:40 -0300, gert <[EMAIL PROTECTED]> escribió: > > > import re > > > def htc(m): > > return chr(int(m.group(1),16)) > > > def urldecode(url

Re: urlDecode()

2007-03-01 Thread Gabriel Genellina
En Wed, 28 Feb 2007 22:45:40 -0300, gert <[EMAIL PROTECTED]> escribió: > import re > > def htc(m): > return chr(int(m.group(1),16)) > > def urldecode(url): > rex=re.compile('%([0-9a-hA-H][0-9a-hA-H])',re.M) > return rex.sub(htc,url) >

Re: urlDecode()

2007-02-28 Thread gert
import re def htc(m): return chr(int(m.group(1),16)) def urldecode(url): rex=re.compile('%([0-9a-hA-H][0-9a-hA-H])',re.M) return rex.sub(htc,url) if __name__ == '__main__': print urldecode('adasasdasd%20asdasdasdas') Ok thats it enough googe

urlDecode()

2007-02-28 Thread gert
Anybody can tell me what i need to import to make urlDecode() work in python2.5 please. import urllib urllib.urlDecode(post) #doesn't exist urllib.urldecode(post) #doesn't exist urldecode(post)#doesn't exist urlDecode(post) #doesn't exist -- ht