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 to view this page for the latest version.
Next

Boost.Python Reference Manual

David Abrahams

Stefan Seefeld

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt


Table of Contents

1. Concepts
CallPolicies
Introduction
CallPolicies Composition
Concept Requirements
Dereferenceable
Introduction
Concept Requirements
Extractor
Introduction
Concept Requirements
Notes
HolderGenerator
Introduction
Concept Requirements
ResultConverter
Introduction
ResultConverter Concept Requirements
ResultConverterGenerator Concept Requirements
ObjectWrapper
Introduction
ObjectWrapper Concept Requirements
TypeWrapper Concept Requirements
Caveat
2. High Level Components
boost/python/class.hpp
Introduction
Class template class_<T, Bases, HeldType, NonCopyable>
Class template bases<T1, T2, ...TN>
Examples
boost/python/def.hpp
Introduction
Functions
Example
boost/python/def_visitor.hpp
Introduction
Class def_visitor
Example
boost/python/docstring_options.hpp
Introduction
Class docstring_options
Class dostring_options constructors
Class docstring_options destructor
Class docstring_options modifier functions
Example
boost/python/enum.hpp
Introduction
Class template enum_
Class template enum_ constructors
Class template enum_ modifier functions
Example
boost/python/errors.hpp
Introduction
Class error_already_set
Functions
Example
boost/python/exception_translator.hpp
Introduction
Function register_exception_translator
Example
boost/python/init.hpp
Introduction
Class template init
Class template optional
Example
boost/python/iterator.hpp
Introduction
Class template iterator
Class template iterator constructors
Class template iterators
Class template iterators nested types
Class template iterators static functions
Functions
Example
boost/python/module.hpp
Introduction
Macros
Examples
boost/python/operators.hpp
Introduction
Class self_ns::self_t
Class template other
Class template detail::operator_
Object self
Example
boost/python/scope.hpp
Introduction
Class scope
Class scope constructors and destructor
Example
boost/python/stl_iterator.hpp
Introduction
Class template stl_input_iterator
Class template stl_input_iterator constructors
Class template stl_input_iterator modifiers
Class template stl_input_iterator observers
Example
boost/python/wrapper.hpp
Introduction
Class override
Class override observer functions
Class template wrapper
Class template wrapper observer functions
Example
3. Object Wrappers
boost/python/dict.hpp
Introduction
Class dict
Example
boost_python_list.hpp
Introduction
Class list
Example
boost/python/long.hpp
Introduction
Class long_
Example
boost/python/object.hpp
Introduction
Class slice_nil
Class const_attribute_policies
Class const_attribute_policies static functions
Class attribute_policies
Class attribute_policies static functions
Class const_objattribute_policies
Class const_objattribute_policies static functions
Class objattribute_policies
Class objattribute_policies static functions
Class const_item_policies
Class const_item_policies static functions
Class item_policies
Class item_policies static functions
Class const_slice_policies
Class const_slice_policies static functions
Class slice_policies
Class slice_policies static functions
Class template object_operators
Class template object_operators observer functions
Class object
Class object constructors and destructor
Class object modifiers
Class template proxy
Class template proxy observer functions
Class template proxy modifier functions
Functions
Example
boost/python/str.hpp
Introduction
Class str
Example
boost/python/slice.hpp
Introduction
Class slice
Class slice constructors
Class slice observer functions
Example
boost/python/tuple.hpp
Introduction
Class tuple
Function make_tuple
Example
4. Function Invocation and Creation
boost/python/args.hpp
Introduction
Class arg
Class arg constructor
Class arg operator=
Keyword-expression operator,
Example
boost/python/call.hpp
Introduction
Function call
Example
boost/python/call_method.hpp
Introduction
Function call_method
Example
boost/python/data_members.hpp
Introduction
Functions
Example
boost/python/make_function.hpp
Introduction
Functions
Example
boost/python/overloads.hpp
Introduction
OverloadDispatcher Concept
Macros
Example
boost/python/ptr.hpp
Introduction
Functions
Class template pointer_wrapper
Class template pointer_wrapper types
Class template pointer_wrapper constructors and destructor
Class template pointer_wrapper observer functions
Metafunctions
Example
boost/python/raw_function.hpp
Introduction
Function raw_function
Example
Function documentation
boost/python/function_doc_signature.hpp
boost/python/pytype_function.hpp
Models of CallPolicies
boost/python/default_call_policies.hpp
boost/python/return_arg.hpp
boost/python/return_internal_reference.hpp
boost/python/return_value_policy.hpp
boost/python/with_custodian_and_ward.hpp
Models of ResultConverter
boost/python/to_python_indirect.hpp
boost/python/to_python_value.hpp
Models of ResultConverterGenerator
boost/python/copy_const_reference.hpp
boost/python/copy_non_const_reference.hpp
boost/python/manage_new_object.hpp
boost/python/reference_existing_object.hpp
boost/python/return_by_value.hpp
boost/python/return_opaque_pointer.hpp
5. To/From Python Type Conversion
boost/python/extract.hpp
Introduction
Class template extract
Class template extract constructors and destructor
Class template extract observer functions
Example
boost/python/implicit.hpp
Introduction
Function template implicit_convertible
Example
boost/python/lvalue_from_pytype.hpp
Introduction
Class template lvalue_from_pytype
Class template extract_identity
Class template extract_member
Example
boost/python/opaque_pointer_converter.hpp
Introduction
Class template opaque constructor
Macro BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(Pointee)
boost/python/to_python_converter.hpp
Introduction
Class template to_python_converter
Example
boost/python/register_ptr_to_python.hpp
Introduction
Function register_ptr_to_python
Example
6. Embedding
boost/python/exec.hpp
Introduction
Function eval
Function exec
Function exec_file
Examples
boost/python/import.hpp
Introduction
Function import
Examples
7. Utility and Infrastructure
boost/python/has_back_reference.hpp
Introduction
Class template has_back_reference
Examples
boost/python/instance_holder.hpp
Introduction
Class template instance_holder
Examples
boost/python/pointee.hpp
Introduction
Class template pointee
Examples
boost/python/handle.hpp
Introduction
Class template handle
Function borrowed
Function allow_null
boost/python/type_id.hpp
Introduction
Class template type_info
Functions
Example
boost/python/ssize_t.hpp
Introduction
Typedefs
Constants
8. Topics
Calling Python Functions and Methods
Introduction
Argument Handling
Result Handling
Rationale
Pickle support
Introduction
The Pickle Interface
Example
Pitfall and Safety Guard
Practical Advice
Light-weight alternative: pickle support implemented in Python
Indexing support
Introduction
The Indexing Interface
index_suite sub-classes
indexing_suite class
class vector_indexing_suite
class map_indexing_suite
9. Glossary

Last revised: April 11, 2018 at 13:55:05 GMT


Next