Alan Baljeu wrote:
To solve this, I intend to write as much Python as possible, to drive
C++ objects, so I won't have to recompile, or restart my environment.
(Previous use of python had a slightly different goal: use Python
minimally for a dynamic modeling problem) So Python code will consist
of interactive and non-interactive scripts. These scripts receive
objects, work with them, and return other objects. There are no
persistent Python objects. There are probably Python classes designed
as temporary wrappers of C++ classes.
Steps
1) Embed Python in this C++ plug-in. [Done.]
2) Expose C++ objects (functions and/or data) defined by the plugin to Python.
3) Write code in Python to create and manipulate those objects. (exec, not
eval)
4) Write code in C++, but only when required to make (2) easy. (Abundant
existing code may hinder my goals, and force more C++)
5) Develop a library of unittest methods.
This sounds perfectly reasonable to me, FWIW.
An interesting question then is how you embed your interactive Python
shell into the application's main event loop. But that's mainly an
implementation detail. :-)
Regards,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig