I think you may create custom python exe... something like the
following and just link against your module and python2x.lib. Of
course, you still need to do the usual stuffs of wrapping around you
own C code. Then you may just 'import xyz' in Python:
#include "Python.h"
#include "xyzmodule.h"
int main(int argc, char **argv)
{
PyImport_AppendInittab("xyz", initxyz);
return Py_Main(argc, argv);
}
Grzegorz Dostatni <gr******@ee.ualberta.ca> wrote in message news:<Pi*************************************@e5-05.ee.ualberta.ca>...
Cheers.
More questions.
Let's say I'm trying to extend python with a c module. That module cannot
be dynamically loaded (for reasons outside my control). I have to create a
custom python executable (or more likely custom python library).
How would I do that? Is there documentation on that somewhere? Most of
what I've seen was for dynamic loading.
2nd Step:
Let's say I'm doing it under windows, using Visual Studio. Is there
anything I have to be aware of?
3rd Step:
Let's say I don't have the source available. I do have the object files,
the resulting libraries and the header files though.
Greg
"The optimist proclaims that we live in the best of all possible worlds,
and the pessimist fears this is true."
- James Branch Cabell