[Zope] Python Classes and Zope.

Peter Bengtsson peter at fry-it.com
Thu Dec 1 11:00:18 EST 2005


Sure you can. It's usually called a "python product" and there are
tutorials and examples you can download from zope.org

The core principle is to inherit from one of the zope classes that you
can find in zope/lib/python/OFS such as Folder, SimpleItem or
UniqueItem.
When you do that you can save instances persistently in the ZODB.

Good luck.

On 12/1/05, Fernando Lujan <fernando.lujan at terra.com.br> wrote:
> There's a way to use a Python class inside zope?
>
> For instance, if I create the class:
>
> class MyClass:
>      "A simple example class"
>      i = 12345
>      def f(self):
>          return 'hello world'
>
> Can I invoke the following code inside a Python Script?
>
> x = MyClass()
> x.f()
>
> I'm using zope 2.7.x series.
>
> Thanks in advance.
>
> Fernando Lujan
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com


More information about the Zope mailing list