Update of /cvsroot/boost/boost/libs/python/doc/tutorial/doc/html/python
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24352/html/python
Modified Files:
embedding.html exposing.html functions.html hello.html
object.html
Log Message:
More fixes for embedding python docs.
Index: embedding.html
===================================================================
RCS file:
/cvsroot/boost/boost/libs/python/doc/tutorial/doc/html/python/embedding.html,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- embedding.html 18 May 2007 15:22:42 -0000 1.14
+++ embedding.html 18 May 2007 15:52:55 -0000 1.15
@@ -40,7 +40,7 @@
Python/C API at all. So stay tuned... <span
class="inlinemediaobject"><img src="../images/smiley.png" alt="smiley"></span>
</p>
<a name="embedding.building_embedded_programs"></a><h3>
-<a name="id2637711"></a>
+<a name="id2654982"></a>
Building embedded programs
</h3>
<p>
@@ -82,7 +82,7 @@
<find-library>$(PYTHON_EMBEDDED_LIBRARY) ;
</pre>
<a name="embedding.getting_started"></a><h3>
-<a name="id2637805"></a>
+<a name="id2655076"></a>
Getting started
</h3>
<p>
@@ -137,7 +137,7 @@
automate the process.
</p>
<a name="using_the_interpreter.running_python_code"></a><h3>
-<a name="id2637984"></a>
+<a name="id2655255"></a>
Running Python code
</h3>
<p>
@@ -188,7 +188,7 @@
a phrase that is well-known in programming circles.
</p>
<a name="using_the_interpreter.manipulating_python_objects"></a><h3>
-<a name="id2638511"></a>
+<a name="id2655783"></a>
Manipulating Python objects
</h3>
<p>
@@ -215,15 +215,12 @@
<span class="keyword">int</span> <span class="identifier">five_squared</span>
<span class="special">=</span> <span class="identifier">extract</span><span
class="special"><</span><span class="keyword">int</span><span
class="special">>(</span><span class="identifier">result</span><span
class="special">);</span>
</pre>
<a name="using_the_interpreter.exception_handling"></a><h3>
-<a name="id2638845"></a>
+<a name="id2656116"></a>
Exception handling
</h3>
<p>
- If an exception occurs in the execution of some Python code, the
PyRun_String
- function returns a null pointer. Constructing a <code
class="literal">handle</code>
- out of this null pointer throws <a
href="../../../../v2/errors.html#error_already_set-spec"
target="_top">error_already_set</a>,
- so basically, the Python exception is automatically translated into a
C++
- exception when using <code class="literal">handle</code>:
+ If an exception occurs in the evaluation of the python expression, <a
href="../../../../v2/errors.html#error_already_set-spec"
target="_top">error_already_set</a>
+ is thrown:
</p>
<pre class="programlisting">
<span class="keyword">try</span>
@@ -232,7 +229,7 @@
<span class="comment">// execution will never get here:
</span> <span class="keyword">int</span> <span
class="identifier">five_divided_by_zero</span> <span class="special">=</span>
<span class="identifier">extract</span><span class="special"><</span><span
class="keyword">int</span><span class="special">>(</span><span
class="identifier">result</span><span class="special">);</span>
<span class="special">}</span>
-<span class="keyword">catch</span><span class="special">(</span><span
class="identifier">error_already_set</span><span class="special">)</span>
+<span class="keyword">catch</span><span class="special">(</span><span
class="identifier">error_already_set</span> <span class="keyword">const</span>
<span class="special">&)</span>
<span class="special">{</span>
<span class="comment">// handle the exception in some way
</span><span class="special">}</span>
@@ -248,7 +245,7 @@
exceptions</a>:
</p>
<pre class="programlisting">
-<span class="keyword">catch</span><span class="special">(</span><span
class="identifier">error_already_set</span><span class="special">)</span>
+<span class="keyword">catch</span><span class="special">(</span><span
class="identifier">error_already_set</span> <span class="keyword">const</span>
<span class="special">&)</span>
<span class="special">{</span>
<span class="keyword">if</span> <span class="special">(</span><span
class="identifier">PyErr_ExceptionMatches</span><span
class="special">(</span><span
class="identifier">PyExc_ZeroDivisionError</span><span class="special">))</span>
<span class="special">{</span>
@@ -265,23 +262,6 @@
(To retrieve even more information from the exception you can use some
of
the other exception handling functions listed <a
href="http://www.python.org/doc/api/exceptionHandling.html"
target="_top">here</a>.)
</p>
-<p>
- If you'd rather not have <code class="literal">handle</code> throw a
C++ exception
- when it is constructed, you can use the <a
href="../../../../v2/handle.html#allow_null-spec" target="_top">allow_null</a>
- function in the same way you'd use borrowed:
- </p>
-<pre class="programlisting">
-<span class="identifier">handle</span><span class="special"><></span>
<span class="identifier">result</span><span class="special">((</span><span
class="identifier">allow_null</span><span class="special">(</span><span
class="identifier">PyRun_String</span><span class="special">(</span>
- <span class="string">"5/0"</span>
- <span class="special">,</span> <span class="identifier">Py_eval_input</span>
- <span class="special">,</span> <span
class="identifier">main_namespace</span><span class="special">.</span><span
class="identifier">ptr</span><span class="special">()</span>
- <span class="special">,</span> <span
class="identifier">main_namespace</span><span class="special">.</span><span
class="identifier">ptr</span><span class="special">()))));</span>
-
-<span class="keyword">if</span> <span class="special">(!</span><span
class="identifier">result</span><span class="special">)</span>
- <span class="comment">// Python exception occurred
-</span><span class="keyword">else</span>
- <span class="comment">// everything went okay, it's safe to use the result
-</span></pre>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
width="100%"><tr>
Index: exposing.html
===================================================================
RCS file:
/cvsroot/boost/boost/libs/python/doc/tutorial/doc/html/python/exposing.html,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- exposing.html 18 May 2007 15:22:43 -0000 1.14
+++ exposing.html 18 May 2007 15:52:55 -0000 1.15
@@ -519,7 +519,7 @@
<div class="titlepage"><div><div><h3 class="title">
<a name="python.class_operators_special_functions"></a>Class Operators/Special
Functions</h3></div></div></div>
<a name="class_operators_special_functions.python_operators"></a><h3>
-<a name="id2628897"></a>
+<a name="id2646169"></a>
Python Operators
</h3>
<p>
@@ -568,7 +568,7 @@
expressions".
</p>
<a name="class_operators_special_functions.special_methods"></a><h3>
-<a name="id2629581"></a>
+<a name="id2646853"></a>
Special Methods
</h3>
<p>
Index: functions.html
===================================================================
RCS file:
/cvsroot/boost/boost/libs/python/doc/tutorial/doc/html/python/functions.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- functions.html 18 May 2007 15:22:43 -0000 1.13
+++ functions.html 18 May 2007 15:52:55 -0000 1.14
@@ -212,7 +212,7 @@
<li><span class="bold"><strong>BOOM!</strong></span></li>
</ol></div>
<a name="call_policies.call_policies"></a><h3>
-<a name="id2631288"></a>
+<a name="id2648560"></a>
Call Policies
</h3>
<p>
@@ -411,7 +411,7 @@
</li>
</ul></div>
<a name="default_arguments.boost_python_function_overloads"></a><h3>
-<a name="id2633142"></a>
+<a name="id2650414"></a>
BOOST_PYTHON_FUNCTION_OVERLOADS
</h3>
<p>
@@ -441,7 +441,7 @@
<span class="identifier">def</span><span class="special">(</span><span
class="string">"foo"</span><span class="special">,</span> <span
class="identifier">foo</span><span class="special">,</span> <span
class="identifier">foo_overloads</span><span class="special">());</span>
</pre>
<a name="default_arguments.boost_python_member_function_overloads"></a><h3>
-<a name="id2633429"></a>
+<a name="id2650701"></a>
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS
</h3>
<p>
@@ -487,7 +487,7 @@
reference</a> for details.
</p>
<a name="default_arguments.init_and_optional"></a><h3>
-<a name="id2633759"></a>
+<a name="id2651031"></a>
init and optional
</h3>
<p>
@@ -561,7 +561,7 @@
(0) arguments and a maximum of 3 arguments.
</p>
<a name="auto_overloading.manual_wrapping"></a><h3>
-<a name="id2634462"></a>
+<a name="id2651734"></a>
Manual Wrapping
</h3>
<p>
Index: hello.html
===================================================================
RCS file:
/cvsroot/boost/boost/libs/python/doc/tutorial/doc/html/python/hello.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- hello.html 18 May 2007 15:22:43 -0000 1.13
+++ hello.html 18 May 2007 15:52:55 -0000 1.14
@@ -26,7 +26,7 @@
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="python.hello"></a> Building Hello World</h2></div></div></div>
<a name="hello.from_start_to_finish"></a><h3>
-<a name="id2578164"></a>
+<a name="id2595436"></a>
From Start To Finish
</h3>
<p>
@@ -101,7 +101,7 @@
platforms. The complete list of Bjam executables can be found <a
href="http://sourceforge.net/project/showfiles.php?group_id=7586"
target="_top">here</a>.
</p>
<a name="hello.let_s_jam_"></a><h3>
-<a name="id2578351"></a>
+<a name="id2595623"></a>
Let's Jam!
</h3>
<p>
@@ -152,7 +152,7 @@
The last part tells BJam that we are depending on the Boost Python
Library.
</p>
<a name="hello.running_bjam"></a><h3>
-<a name="id2578480"></a>
+<a name="id2595752"></a>
Running bjam
</h3>
<p>
Index: object.html
===================================================================
RCS file:
/cvsroot/boost/boost/libs/python/doc/tutorial/doc/html/python/object.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- object.html 18 May 2007 15:22:43 -0000 1.13
+++ object.html 18 May 2007 15:52:55 -0000 1.14
@@ -199,7 +199,7 @@
</span><span class="identifier">d</span><span class="special">[</span><span
class="char">'whatever'</span><span class="special">]</span> <span
class="special">=</span> <span class="number">3</span><span
class="special">;</span> <span class="comment">// modifies the copy
</span></pre>
<a name="derived_object_types.class__lt_t_gt__as_objects"></a><h3>
-<a name="id2636263"></a>
+<a name="id2653534"></a>
class_<T> as objects
</h3>
<p>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs