Extending Python and Zope in C
By Michael Roberts2004-12-04
Taking it to Zope
Once your Python extension is complete, the next step is getting Zope to work with it. There are a couple of routes you can take, and to a certain extent, the way you want your extension to work with Zope will influence the way you build it in the first place. The basic ways to use your Python (and by extension, C) code from inside Zope are:
• If your function is very simple, you can treat it as a variable. These are called "External Methods."
• More complex classes can be called from Zope scripts (a new feature in Zope 2.3).
• You can define a Zope Product, which can then be extended with ZClasses (a managed set of Web-accessible objects), used in scripts, or published in its own right, with instances being treated like pages.
Of course, your own application may use some combination of these modes.
Tutorial Pages:
» The Best of Both Worlds
» Extending Python for Fun and Profit
» Writing the Code
» Building the Extension
» Taking it to Zope
» Creating an External Method
» Zope scripts: Cliff Notes version
» Going all out With a Product
» Where to go From Here
» Resources
First published by IBM DeveloperWorks
