[Zope] user defined libraries

Paul Winkler pw_lists@slinkp.com
Wed, 24 Jul 2002 16:59:21 -0400


On Wed, Jul 24, 2002 at 04:50:06PM -0400, Matthew T. Bell wrote:
> Silly question: How does one use use one's own library of Python classes
> (imported using an import statement) inside a zope'd python script?  Right
> now its giving me an error message whenever I try to do such.

The "Python Scripts" which you edit through the web have severe
security restrictions on what you're allowed to import.

You can:

1) use an External Method - import anything

or

2) write a Zope Product wrapper around your python module,
providing an interface which any Zope object (python script, 
dtml pages, etc) can use to call your code.

#2 is a lot more work, but very flexible in the long run.

-- 

Paul Winkler
home:  http://www.slinkp.com
"Muppet Labs, where the future is made - today!"