Intersesting Questions involving extending and embedding

Fredrik Lundh fredrik at pythonware.com
Fri Mar 2 08:40:16 CET 2001


"Dev_NuLL" wrote:
> A complied C module is much faster than a Py or PYC and when you are
> dealing with complex graphics code you need all the speed you can get,
> but I guess you cannot help me here.

I don't think anyone can help someone who wants to compile
Python source code with a C compiler, without translating the
code in any way.

But I'll make one last attempt:

- If you have Python source code (as you said in your first post),
Ship it as a PYC file, or convert it to a C module using python2c
or freeze-style techniques.

- If you're writing C or C++ code, you're *extending* Python.
Read the docs again, and look as the samples shipped with the
source distribution.  There's some 80 extension modules in the
Modules directory, so there should be plenty of inspiration.

Cheers /F





More information about the Python-list mailing list