Lass::python

Expose your C++ code to Python because strong typing is for those with a weak memory.

This series of tutorials will guide you through your first steps in combining C++ and Python. lass::python is a tool that can be used for extending Python and for using your extended class inside an embedded Python interpreter. The first tutorial will be about setting up your first extension module using lass::python. Note that each of the tutorials comes with an example with Visual Studio 2005 project files. See the next paragraph on how to build the examples and use the test code that comes along with it.

In this series:

Building the examples:

At this point the examples have been tested to compile and to function properly but during the writing of this series sometimes the code is tweaked a bit and something breaks. Nothing should be difficult to fix. If you have suggestions/remarks/improvements just let them know to [email protected] or [email protected]

After you have setup a Python distro the next step is to unpack the accompagning lass distribution. Use the given installer for this. After you have setup the lass distribution it is time to set up some environment variables so the example files know where to look for header and libraries. You will need to set up LASS_PATH and PYTHON_PATH. An examples is LASS_PATH=c:\program files\Cocamware\Lass-1.2.0\ and PYTHON_PATH=c:\Python25\ Note that they both end with a backslash! After setting these up the example should compile and work in release mode. If you want debug mode to work you will need the debug version of Lass and Python. Contact one of the authors if you are stuck in this process.

Copyright 2007-2010, Tom De Muer and Bram de Greve.