Injecting a C side object into the local dict

J

Jamie R. Parent

Hello,

How do you go about taking a variable which was declared in C and pass
that through to a Python script? I have tried doing this by adding a
simple string which is a PyObject from C into the local dictionary and
retrieving it from script via a locals()["myCvar"] print statement.
This however does not seem to work. It would seem that when the scripts
are ran the local dictionary with the added item is wiped clean and a
new local dictionary is instead used. Any direction or help would be
appreciated.

Cheers,
Jamie.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top