I was reading some legacy code we have here, and discovered an unexpected
idiom. Starting from C++, we create a dictionary, store a few named constants
in there, and then call PyEval_EvalCode passing in the dictionary. The code it
calls is a bunch of python files generated from a CAD model, with no function
definitions. It works of course. Question is, what do you think of this
approach? What is a more typical idiom?
Alan Baljeu
__________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your
favourite sites. Download it now at
http://ca.toolbar.yahoo.com.
_______________________________________________
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig