Differences between revisions 13 and 43 (spanning 30 versions)
Revision 13 as of 2002-11-15 19:52:04
Size: 2287
Editor: MikeRovner
Comment: v2
Revision 43 as of 2008-09-22 11:01:40
Size: 843
Editor: pD9E874CA
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
The Boost Python Library allows the use of C/C++ from Python. It is part of the larger boost package (http://www.boost.org). '''Boost.Python''' binds C++ and Python. Read ["/GettingStarted"] for an introduction.
Line 3: Line 3:
Use the Boost Python Library to quickly and easily export a C++ library to Python such that the Python interface is very similar to the C++ interface. It is designed to be minimally intrusive on your C++ design. In most cases, you should not have to alter your C++ classes in any way in order to use them with Boost.Python. The system should simply ''reflect'' your C++ classes and functions into Python.

A summary of the development goals is available on the Python [http://www.python.org/sigs/c++-sig/ C++-sig] page, which also serves as a mailing list for users of the library. Documentation is available on http://www.boost.org/libs/python/doc/index.html

While full set of documentation is being developed, this page seems like a good place to assemble more info and cookbook.
This page serves as a forum to gather peoples' experience and as a
cookbook, as it is more dynamic by nature and open to contributors.
Line 10: Line 7:
 * ["boost.python/FAQ"]
 * ["boost.python/def,scope"]
 * ["boost.python/class"]
 * ["boost.python/extract"]
 * ["boost.python/object"]
 * ["boost.python/list"]
 * ["boost.python/iterator"]
 * ["/GettingStarted"]
 * ["/FAQ"]
 * /HowTo
 * /BuildingExtensions
 * ["/module"] level: def,scope
 * ["/class"]
 * ["/extract"]
 * ["/object"]
 * ["/list"]
 * ["/iterator"]
 * /CallPolicy
 * /RuntimeErrors
 * /RelatedProjects
Line 19: Line 22:
 1. boost.python/SimpleExample
 1. boost.python/ExportingClasses
 1. boost.python/OverridableVirtualFunctions
 1. boost.python/FunctionOverloading
 1. ["boost.python/Inheritance"]
 1. boost.python/SpecialMethod
 1. boost.python/PeekUnderTheHood
 1. boost.python/CrossExtensionModuleDependencies
 1. boost.python/WrappingEnums
 1. boost.python/PointersAndSmartPointers
 1. boost.python/InternalDataStructures
 1. /SimpleExample
 1. /ExportingClasses
 1. /OverridableVirtualFunctions
 1. /FunctionOverloading
 1. ["/Inheritance"]
 1. /SpecialMethods
 1. /PeekUnderTheHood
 1. /CrossExtensionModuleDependencies
 1. /WrappingEnums
 1. /PointersAndSmartPointers
 1. /InternalDataStructures
 1. /EmbeddingPython
Line 31: Line 35:
----
From David Abrahams:

Boost.Python is designed with the idea in mind that users never touch a Py``Object*.

Boost.Python depends on quite a few of the other boost libraries (possibly a few others):
 * type_traits
 * bind
 * function
 * mpl
 * smart_ptr

IIUC, ["weave"] can be used for embedding nontrivial C++ code, if you're
willing to stick it all inside one function body. Furthermore, tools like
weave.blitz() can make an enormous difference by compiling an entire C++
expression template corresponding to an arbitrarily complicated Python
expression. Surely that's nontrivial. It's definitely ''cool''. I think weave
offers enormous power to the person who's programming mostly in Python.
Test cases:
 * /StlContainers

Boost.Python binds C++ and Python. Read ["/GettingStarted"] for an introduction.

This page serves as a forum to gather peoples' experience and as a cookbook, as it is more dynamic by nature and open to contributors.

Various items:

Tutorial:

  1. /SimpleExample

  2. /ExportingClasses

  3. /OverridableVirtualFunctions

  4. /FunctionOverloading

  5. ["/Inheritance"]
  6. /SpecialMethods

  7. /PeekUnderTheHood

  8. /CrossExtensionModuleDependencies

  9. /WrappingEnums

  10. /PointersAndSmartPointers

  11. /InternalDataStructures

  12. /EmbeddingPython

Test cases:

boost.python (last edited 2008-11-15 14:00:11 by localhost)

Unable to edit the page? See the FrontPage for instructions.