[Tutor] Declaring a Python/C Package and Accessing Python Constants from C API
atpridgen at mail.utexas.edu
Fri May 11 22:12:24 CEST 2007
I am trying to create a python package that includes both a native
python module and then a python module created using the Python/C API.
I have several questions pertaining to this area. First, how do I
make the C API module aware of the python module. Specifically, I
have declared all of my constant variables because it was much easier
and cleaner, but I want to be able to access those constants from my C
API module. I know I can declare the python module globally, but the
python module and the C API module are part of the same package. I
have read Python C/API guide, and I could not find anything like an
example or explanation related to performing this task. I have also
seen a couple of posts online, but they seem to miss over this point.
Is there anyone out there that has done something like this before? I
am on a Posix/Linux system.
Thanks in advance,
More information about the Tutor