MD <[EMAIL PROTECTED]> wrote:

> Hi,
> 
>    I would like to access "variables" defined in my Python program in
> a C module extension for Python. Is this possible? I looked at the
> Python C API reference but didn't find anything there that could help
> me.

If they're global variables of a certain module XYZ, your C code may
"import" XZY (or look it up in the C API equivalent of the sys.modules
dict) and get those variables as attributes of object XYZ.  Is that what
you mean by ``variables defined in your Python program''...?


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to