Extending Python and Zope in C
By Michael Roberts2004-12-04
The Best of Both Worlds
You might want to extend Zope in C for several reasons. The most likely is that you have an existing C library that already does something you need, and you're not excited about translating it to Python. Also, since Python is an interpreted language, any Python code that gets called a lot is going to slow you down. So even if you have some extension you've written in Python, you may still want to consider moving the most often called parts into C. Either way, extending Zope starts with extending Python. Furthermore, extending Python gets you other nice benefits because your code is accessible from any Python script, not just Zope. The only caveat here is that although Python's current version is 2.1 as of this writing, Zope still runs only with Python 1.5.2. For C extensions, there are no changes between the two versions, but if you get fancy with the Python wrappings for your library, you need to be careful not to use anything that's newer than 1.5.2 if you want it all to work under Zope.
Tutorial pages:
|
First published by IBM DeveloperWorks
|
|||||||||
You might also want to check these out:
|
Leave a Comment on "Extending Python and Zope in C"
You must be logged in to post a comment.
Link to This Tutorial Page!

