Thank you! Just what I needed.
I came across the PyObject_*AttrString() functions earlier when
searching through the docs, and I thought I was in the right area, but
I didn't know what object I was supposed to set the attribute for.
Now I see that it's a module object. It all makes sense now. T
[EMAIL PROTECTED] wrote:
>>From the C API (I'm using Python embedded), how can I get and set the
> value of named variables? Right now, I'm using hacks like
> PyRun_SimpleString("foobar = 12\n"), but I'd really like to access the
> named objects directly.
>
You can use the following C functions
>From the C API (I'm using Python embedded), how can I get and set the
value of named variables? Right now, I'm using hacks like
PyRun_SimpleString("foobar = 12\n"), but I'd really like to access the
named objects directly.
--
http://mail.python.org/mailman/listinfo/python-list