Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.

Boost.Python

News/Change Log

Current SVN
1.39.0 Release
12 May 2007 - 1.34.0 release
19 October 2005 - 1.33.1 release
14 August 2005 - 1.33 release
11 March 2005
19 November 2004 - 1.32 release
8 Sept 2004
Support for Python's Bool type, thanks to Daniel Holth.
11 Sept 2003
9 Sept 2003
Added new str
constructors which take a range of characters, allowing strings containing nul ('\0') characters.
8 Sept 2003
Added the ability to create methods from function objects (with an operator()); see the make_function docs for more info.
10 August 2003
Added the new properties unit tests contributed by Roman Yakovenko and documented add_static_property at his urging.
1 August 2003
Added the new arg class contributed by Nikolay Mladenov which supplies the ability to wrap functions that can be called with ommitted arguments in the middle:
void f(int x = 0, double y = 3.14, std::string z = std::string("foo"));

BOOST_PYTHON_MODULE(test)
{
   def("f", f
       , (arg("x", 0), arg("y", 3.14), arg("z", "foo")));
}
 
And in Python:
>>> import test
>>> f(0, z = "bar")
>>> f(z = "bar", y = 0.0)
Thanks, Nikolay!
22 July 2003
Killed the dreaded "bad argument type for builtin operation" error. Argument errors now show the actual and expected argument types!
19 July 2003
Added the new return_arg policy from Nikolay Mladenov. Thanks, Nikolay!
18 March, 2003
Gottfried Ganßauge has contributed opaque pointer support.
Bruno da Silva de Oliveira has contributed the exciting Pyste ("Pie-steh") package.
24 February 2003
Finished improved support for boost::shared_ptr. Now any wrapped object of C++ class X can be converted automatically to shared_ptr<X>, regardless of how it was wrapped. The shared_ptr will manage the lifetime of the Python object which supplied the X, rather than just the X object itself, and when such a shared_ptr is converted back to Python, the original Python object will be returned.
19 January 2003
Integrated staticmethod support from Nikolay Mladenov. Thanks, Nikolay!
29 December 2002
Added Visual Studio project file and instructions from Brett Calcott. Thanks, Brett!
20 December 2002
Added automatic downcasting for pointers, references, and smart pointers to polymorphic class types upon conversion to python
18 December 2002
Optimized from_python conversions for wrapped classes by putting the conversion logic in the shared library instead of registering separate converters for each class in each extension module
19 November 2002
Removed the need for users to cast base class member function pointers when used as arguments to add_property
13 December 2002
Allow exporting of enum_ values into enclosing scope.
Fixed unsigned integer conversions to deal correctly with numbers that are out-of-range of signed long.
14 November 2002
Auto-detection of class data members wrapped with make_getter
13 November 2002
Full Support for std::auto_ptr<> added.
October 2002
Ongoing updates and improvements to tutorial documentation
10 October 2002
Boost.Python V2 is released!

Revised 19 November 2004

© Copyright Dave Abrahams 2002-2003.