[Zope] How to import a basic class in Script (Python)

Andreas Jung lists at zopyx.com
Wed Jul 18 05:37:51 EDT 2007



--On 18. Juli 2007 12:26:06 +0300 Tudor Gabriel <tdrgabi at gmail.com> wrote:

> To learn zope I am trying to write a basic library page.
> I wrote a book_py class ... and from search_books_py try to return a
> list of books to show in a ZPT.
>
> now let's suppose all the files (all the py and zpt files) are in the
> same directory:Library
>
> in search_books_py i tried importing the book class in this ways:
>
> from book_py import *
> from Library.book_py import *
> from here.book_py import *
> from container.book_py import *


Move your code into a "Product" (see Zope Developers Guide) or use
an external method. PythonScripts are not equal to an unrestricted
Python environment.

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20070718/e79c2ea7/attachment.bin


More information about the Zope mailing list