summaryrefslogtreecommitdiff
path: root/libs/python/doc/html/building/background.html
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:33:54 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:36:09 +0900
commitd9ec475d945d3035377a0d89ed42e382d8988891 (patch)
tree34aff2cee4b209906243ab5499d61f3edee2982f /libs/python/doc/html/building/background.html
parent71d216b90256936a9638f325af9bc69d720e75de (diff)
downloadboost-d9ec475d945d3035377a0d89ed42e382d8988891.tar.gz
boost-d9ec475d945d3035377a0d89ed42e382d8988891.tar.bz2
boost-d9ec475d945d3035377a0d89ed42e382d8988891.zip
Imported Upstream version 1.60.0
Change-Id: Ie709530d6d5841088ceaba025cbe175a4ef43050 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'libs/python/doc/html/building/background.html')
-rw-r--r--libs/python/doc/html/building/background.html70
1 files changed, 70 insertions, 0 deletions
diff --git a/libs/python/doc/html/building/background.html b/libs/python/doc/html/building/background.html
new file mode 100644
index 0000000000..a7aca7f031
--- /dev/null
+++ b/libs/python/doc/html/building/background.html
@@ -0,0 +1,70 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Background</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="../index.html" title="Boost.Python">
+<link rel="up" href="../building.html" title="Chapter&#160;1.&#160;Building and Testing">
+<link rel="prev" href="../building.html" title="Chapter&#160;1.&#160;Building and Testing">
+<link rel="next" href="no_install_quickstart.html" title="No-Install Quickstart">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="" width="" height="" src="../images/boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../building.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../building.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="no_install_quickstart.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="building.background"></a><a class="link" href="background.html" title="Background">Background</a>
+</h3></div></div></div>
+<p>
+ There are two basic models for combining C++ and Python:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <a href="http://www.python.org/doc/current/ext/intro.html" target="_top">extending</a>,
+ in which the end-user launches the Python interpreter executable and
+ imports Python &#8220;extension modules&#8221; written in C++. Think of taking
+ a library written in C++ and giving it a Python interface so Python programmers
+ can use it. From Python, these modules look just like regular Python
+ modules.
+ </li>
+<li class="listitem">
+ <a href="http://www.python.org/doc/current/ext/embedding.html" target="_top">embedding</a>,
+ in which the end-user launches a program written in C++ that in turn
+ invokes the Python interpreter as a library subroutine. Think of adding
+ scriptability to an existing application.
+ </li>
+</ul></div>
+<p>
+ The key distinction between extending and embedding is the location of the
+ C++ <code class="computeroutput"><span class="identifier">main</span><span class="special">()</span></code>
+ function: in the Python interpreter executable, or in some other program,
+ respectively. Note that even when embedding Python in another program, <a href="http://www.python.org/doc/current/ext/extending-with-embedding.html" target="_top">extension
+ modules are often the best way to make C/C++ functionality accessible to
+ Python code</a>, so the use of extension modules is really at the heart
+ of both models.
+ </p>
+<p>
+ Except in rare cases, extension modules are built as dynamically-loaded libraries
+ with a single entry point, which means you can change them without rebuilding
+ either the other extension modules or the executable containing <code class="computeroutput"><span class="identifier">main</span><span class="special">()</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2002-2015 David
+ Abrahams, Stefan Seefeld<br>Copyright &#169; 2002-2015 David Abrahams, Stefan Seefeld<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../building.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../building.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="no_install_quickstart.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>