Hey, there! I'm not really a newbie, but I seem to have gotten in over my head by trying to import pdflib_py to generate pdf files from inside a script. ( http://www.pdflib.com ) Here is the situation: my Zope site is hosted by an ISP who does not allow shell access. This makes developing external methods impossible. They are willing to install custom Products and such after reviewing the code. We've gotten as far as compiling and installing the pdflib_py.so so that Zope's python interpreter can access it. We've set up the allow_access('pdflib_py') stuff, but still get a Zope error: "from pdflib_py import *" is not allowed. According to an article from 2001, I now need to create a Product. (http://www-106.ibm.com/developerworks/library/l-pyzo.html) The Zope Book and Developer's Guide each go into the creation of Products. It feels like I've taken a wrong turn. I don't want a complete Product with the ability to add it through the ZMI. I just want to access the functions in a library from a zope script. Which way do I go next? Thanks! Blossom
Blossom Merz wrote:
It feels like I've taken a wrong turn. I don't want a complete Product with the ability to add it through the ZMI. I just want to access the functions in a library from a zope script.
Nope, you're on the right track. YTour product doesn't have to make instatiatable object available, it may just contain the missing security declarations for your python library in an __init__.py Have a look at Products/PythonScripts/standard.py for some examples. cheers, Chris
participants (2)
-
Blossom Merz -
Chris Withers