The urllib is not available in Python Scripts due
to security reasons.
I have added
allow_module('urllib')
in my __init__.py file under
lib/python/Products/PythonScripts
Restart zope and you can now start using
urllib.
---
This following text is taken from the module_access_examples.py file in the
PythonScripts directory:
-- cut cut --
This file contains example code that can be used to make
various
standard Python modules available to Scripts.
In order to use the example code, create a directory
called
"MyScriptModules", or something equally descriptive, in your
Zope's
"Products" directory. Copy this file to a file called
"__init__.py" in
the new directory. Edit the new file,
uncommenting the block of code
for each module that you want to
make available for import by Scripts.
You can, of course, add your own code to your "__init__.py" for
modules
that are not listed below. The list is not comprehensive,
but is
provided as a decent cross-section of modules.
-- cut cut --
Best regards
Petter Enholm
----- Original Message -----
Sent: Tuesday, March 19, 2002 12:55
PM
Subject: [Zope] URL encoding in a python
script?
Is there an equivalent to urllib.urlencode for
Python scripts?
I tried to import urllib and then use the above,
but no luck. Am I missing something obvious?
Thanks
Etienne