Maintaining a Python Object when embedding in C -


due refactoring/reworking on controller i've had embed python interpreter inside c application. can call python functions , pass/get objects python fine.

the python code controller robot (currently simulated), needs make use of c code comparisons i'm making.

previously python code created objects, read sensors, ran control code , wrote outputs motors. of except control code needs done in c. problem have objects created in init function (in python) which, when come run control code no longer exist.

what best way solve this? idea return controllers init function , store references them in c, passing reference controller each time called.

thanks help.

this may not answer want, there ways of working c , python other embedding interpreter inside c application.

namely, why don't opposite? create c libraries python? can control general flow of application in python, more comfortable, , call c code whenever see fit.

again, i'm not addressing actual question, feel free ignore me.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -