mirror of
https://github.com/boostorg/python.git
synced 2026-01-20 16:52:15 +00:00
123 lines
5.1 KiB
HTML
123 lines
5.1 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN"
|
|
"http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
|
<title>
|
|
py_cpp Python/C++ binding documentation
|
|
</title>
|
|
<h1>
|
|
<img src="c++boost.gif" alt="c++boost.gif (8819 bytes)" width="277"
|
|
align="center" height="86"> py_cpp<a href="#naming_contest">*</a>
|
|
</h1>
|
|
<p>
|
|
Py_cpp is a system for quickly and easily interfacing C++ code with <a
|
|
href="http:www.python.org">Python</a> 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 py_cpp. The system
|
|
<em>should</em> simply "reflect" your C++ classes and functions into
|
|
Python.
|
|
<p>
|
|
The source code for py_cpp, including a MSVC demo project is available
|
|
<a href="py_cpp_20001019.zip">here</a>. It has been tested against Python
|
|
1.5.2 with GCC 2.95.2, Metrowerks CodeWarrior Pro6 and with Microsoft
|
|
Visual C++ 6 sp4 using both the <a href="http://www.stlport.org">
|
|
STLport</a> standard library implementation <em>and</em> the library
|
|
implementation which ships with the compiler. It has also been tested
|
|
against Python 2.0c1 with MSVC++ 6sp4 by Alex Martelli.
|
|
Py_cpp requires the <a href="http://www.boost.org">Boost</a> libraries,
|
|
and is currently under formal review on <a href=
|
|
"http://www.egroups.com/list/boost">the boost mailing list</a> for
|
|
acceptance into boost.
|
|
<p>
|
|
py_cpp was originally written by David Abrahams. Ullrich Koethe supplied
|
|
an early version of the overloading support and wrote the support for
|
|
implicit conversions of arguments that have a C++ inheritance
|
|
relationship. Alex Martelli supplied the first tests against Python 2.0.
|
|
The members of the boost mailing list and the Python community supplied
|
|
invaluable early feedback. The development of py_cpp wouldn't have been
|
|
possible without the generous support of Dragon Systems/Lernout and
|
|
Hauspie, Inc.
|
|
<h2>
|
|
Table of Contents
|
|
</h2>
|
|
<ol>
|
|
<li>
|
|
<a href="extending.html">A Brief Introduction to writing Python
|
|
extension modules</a>
|
|
<li>
|
|
<a href="comparisons.html">Comparisons between py_cpp and other systems
|
|
for extending Python</a>
|
|
<li>
|
|
<a href="example1.html">A Simple Example Using py_cpp</a>
|
|
<li>
|
|
<a href="overriding.html">Overridable Virtual Functions</a>
|
|
<li>
|
|
<a href="overloading.html">Function Overloading</a>
|
|
<li>
|
|
<a href="special.html">Special Method Name Support</a>
|
|
<li>
|
|
<a href="under-the-hood.html">A Peek Under the Hood</a>
|
|
</ol>
|
|
<p>
|
|
More sophisticated examples, including examples which demonstrate that
|
|
these ExtensionClasses support some of Python's "special" member
|
|
functions (e.g. <code>__getattr__(self, name)</code>), are given in
|
|
<code>extclass_demo.cpp</code>, <code> extclass_demo.h</code>, and <code>
|
|
test_extclass.py</code> in the <a href="py_cpp.tgz">source code
|
|
archive</a>. There's much more here, and much more documentation to
|
|
come...
|
|
<p>
|
|
Questions should be directed to <a href=
|
|
"http://www.egroups.com/list/boost">the boost mailing list</a> or to <a
|
|
href="mailto:abrahams@mediaone.net"> David Abrahams</a>, the primary
|
|
author and maintainer.
|
|
<h3>
|
|
Naming Contest
|
|
</h3>
|
|
<p>
|
|
Yes, I know py_cpp is a lousy name. Problem is, the best names my puny
|
|
imagination can muster (IDLE and GRAIL) are taken, so I'm holding a
|
|
naming contest. First prize? You get to pick the name<0.2wink> and
|
|
you will be credited in the documentation. Names that have been suggested
|
|
so far include:
|
|
<ul>
|
|
<li>
|
|
Py++
|
|
<li>
|
|
Python++
|
|
<li>
|
|
Coil
|
|
<li>
|
|
SnakeSkin
|
|
<li>
|
|
CCCP - <strong>C</strong>onvert <strong>C</strong>++ <strong>
|
|
C</strong>lasses to <strong>P</strong>ython
|
|
<li>
|
|
C<sup>3</sup>PO - <strong>C</strong>onvert <strong>C</strong>++
|
|
<strong>C</strong>lasses to <strong>P</strong>ython <strong>
|
|
O</strong>bjects
|
|
<li>
|
|
PALIN - <strong>P</strong>ython <strong>
|
|
A</strong>ugmented-<strong>L</strong>anguage <strong>
|
|
IN</strong>tegration
|
|
<li>
|
|
C-thru
|
|
<li>
|
|
SeamlessC
|
|
<li>
|
|
BorderCrossing
|
|
</ul>
|
|
Please <a href="http://www.egroups.com/list/boost">post</a> or send <a
|
|
href="http:mailto:abrahams@mediaone.net">me</a> your suggestions!<br>
|
|
<br>
|
|
|
|
<p>
|
|
© Copyright David Abrahams 2000. Permission to copy, use, modify,
|
|
sell and distribute this document is granted provided this copyright
|
|
notice appears in all copies. This document is provided "as is" without
|
|
express or implied warranty, and with no claim as to its suitability for
|
|
any purpose.
|
|
<p>
|
|
Updated: Oct 18, 2000
|
|
|