
Prasan writes -
Are you aware of the Boost libraries for writing Python extensions in C++?
http://www.boost.org/libs/python/doc/
The beauty being that bindings created with Boost allow C++ classes to be inheritable and extendible in Python, rather than just scripted by Python.
I've used boost::python, and I like enough to use it at work. However, for the classroom, I'm using Python as a model for scripting languages, and I think that understanding the idea of 'extension' by hand-coding some bindings would be useful (we could of course require the bindings to be hand-written as a homework ass., and then recommend they use boost::python for the final project).
I guess the distinction between hand-coding and what it is one does using the mechanism provided via boost is lost on me. I understand that SWIG is an automated tool, and can better understand the distinction if made as to that tool. Do you mean you want the student writing directly to the Python extension API In C, versus C++, counting references (as if I understand what I am saying by saying this) - and so forth. I recently saw the release of package in the graphics area that had ported, in the new version, their C extension code to Pyrex. Once again, the problem is a good one - a number of good and interesting possible ways to go. Art