[C++-sig] A few questions...

Jeremy Fincher fincher.8 at osu.edu
Fri Aug 8 07:42:01 CEST 2003

I'm new to Boost::Python (and C++ in general, though I'm at least somewhat 
more experienced with C++ than B::P :)), and am having a bit of trouble with 

First, it seems that Debian doesn't include bjam in its boost packages; I've 
read in several places that it's just as possible to compile Boost (and 
Boost::Python) stuff with make.  Does anyone have any Makefiles they've used 
to compile a Boost::Python project that I could examine and learn from?

Also, the documentation on special operators seems to be a bit unclear.  The 
documentation says this about the Rational example:

"What is the business of operator<< .def(str(self))? Well, the method str 
requires the operator<< to do its work (i.e. operator<< is used by the method 
defined by def(str(self)). "

Does this mean that if I use ".def(str(self))" in my class_ definition, I need 
to have defined an overloaded << in the same way?  My actual class defines a 
method "std::string str()" -- is there a way to declare that as my Python 
__str__ method?  If I could compile my code, I'd try out '.def("__str__", 
&IrcMsg::str)', but I can't :|

I've got a question or two more about how to declare an __init__ with keyword 
parameters, but I'll wait until I can compile my code to ask that :)



More information about the Cplusplus-sig mailing list