|
|
Extending Python and Zope in C |
|
|
Extending Python and Zope in C |
|
|
Python / Miscellaneous |
|
|
Click to Visit |
|
|
19 |
|
To extend Zope, you first extend Python. While extending Python is not brain surgery, it's no walk in the park either. There are two basic components to a Python extension. The first is obviously the C code. I'll cover that in a minute. The other component is the Setup file. The Setup file describes the module by supplying its module name, the location of its C code, and any compiler flags you may need. This file is preprocessed to create a makefile (on UNIX) or MSVC++ project files (on Windows). Before you ask -- Python on Windows is indeed built using the Microsoft compilers. The folks at Python.org recommend using MSVC++ to build extensions as well. It stands to reason that you should be able to persuade GNU compilers to do the trick, but I haven't tried that myself.
|