Weirdness when trying to use Boost.python

Gouda Man youdontneedtosendme at email.com
Mon Dec 15 17:34:20 EST 2003


I'm planning to write a large program that will have advanced scripting in 
python in which the scripter will subclass c++ objects to add 
functionality. this leads me to boost.python (if you dont already know 
about boost.python dont bother reading farther cause its a kind of a 
technical question) anyways i embeded python in a litte c++ test app i 
wrote and got it working fine. eg: i could write a little python program 
and my app would load and run it. then i added boost.python to expose a 
sample class to the python code. i think i know how to use boost cause i 
basically followed the tutorial and the code compiles fine but the module 
boost is supposedly creating doesn't exist when the code (python code) is 
run . now if i use just the C python API can can interface some simple 
functions but not classes. there is an api which creates the module based 
on a object returned from another api. Now i cant get boost to give me that 
object. since there is no readily apparent way of doing this i assumed that 
boost did i t automatically but this apears not to be true. Also looking at 
the boost source was just more confusing. everyting uses INSANE macros 
which call other macros though 50+ include files  so no help there. the 
boost documentation talks about exposing classes and embedding python but 
not the two together. Any ideas? Oh also just FYI: I'm running XP Prof, 
using VC++ 6 SP5, Python 2.3.2, and the current CVS of Boost cause the 
release only supports python 2.2.x.





More information about the Python-list mailing list