[Zope] URL quoting from a Python script

Evan Simpson evan@digicool.com
Tue, 24 Apr 2001 21:13:04 -0400


From: "Tim Moore" <tmoore@tembel.org>
> I know that dtml-var has the url_quote_plus attribute, but is there a
> way to do the same thing from a python script?  Or, for that matter,
> any of the other text-munging functions that dtml-var supports?

You can import them from Products.PythonScripts.standard, as in:

from Products.PythonScripts.standard import url_quote_plus
return url_quote_plus(txt)

There are one or two other useful bits in this module.

Cheers,

Evan @ digicool