[email protected] wrote: > I'm writing a C extension for Python, is it possible to define > constants in the C code and have them visible from Python?
There's an API function to create a module-level name with a given value,
e.g.
PyModule_AddIntConstant (module, "S_IRUSR", S_IRUSR); // user read
In this example, S_IRUSR was defined in one of the .h files for the
functions being wrapped.
Mel.
--
http://mail.python.org/mailman/listinfo/python-list
