X-Git-Url: http://dolda2000.com/gitweb/?p=wrw.git;a=blobdiff_plain;f=wrw%2Fproto.py;fp=wrw%2Fproto.py;h=aed5c4edb301992e5280da2ec1b68563e4f06ecb;hp=881f4e477a84152257e7eb037b6571545c53208a;hb=08a4b741946ae4d55d864f7c527657ab46b8d83b;hpb=eacc5938f23818a348ee17f557484a706462c170 diff --git a/wrw/proto.py b/wrw/proto.py index 881f4e4..aed5c4e 100644 --- a/wrw/proto.py +++ b/wrw/proto.py @@ -156,3 +156,10 @@ def parstring(pars = {}, **augment): if buf != "": buf += "&" buf += urlq(key) + "=" + urlq(str(augment[key])) return buf + +def parurl(url, pars = {}, **augment): + qs = parstring(pars, **augment) + if qs != "": + return url + "?" + qs + else: + return url