summaryrefslogtreecommitdiffstats
path: root/Doc/extending
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-11-02 06:34:46 (GMT)
committerGeorg Brandl <georg@python.org>2012-11-02 06:34:46 (GMT)
commited71918d1297c9d478e497c783520d46b2bc0ee4 (patch)
tree2d36a0e8469824ae2d18db3d907a4df950599f5b /Doc/extending
parente2af5098295c97aae8802d8dc7c332bd75e6ab89 (diff)
parent4552e3f95c3382a4665cb8adab343521f8898331 (diff)
downloadcpython-ed71918d1297c9d478e497c783520d46b2bc0ee4.zip
cpython-ed71918d1297c9d478e497c783520d46b2bc0ee4.tar.gz
cpython-ed71918d1297c9d478e497c783520d46b2bc0ee4.tar.bz2
merge with 3.2
Diffstat (limited to 'Doc/extending')
-rw-r--r--Doc/extending/embedding.rst22
1 files changed, 10 insertions, 12 deletions
diff --git a/Doc/extending/embedding.rst b/Doc/extending/embedding.rst
index ccbe681..d7cdee6 100644
--- a/Doc/extending/embedding.rst
+++ b/Doc/extending/embedding.rst
@@ -66,18 +66,16 @@ perform some operation on a file. ::
return 0;
}
-Function :c:func:`Py_SetProgramName` should be called before
-:c:func:`Py_Initialize` to inform the interpreter about paths to
-Python run-time libraries. Next initialize the Python interpreter
-with :c:func:`Py_Initialize`, followed by the execution of a
-hard-coded Python script that prints the date and time. Afterwards,
-the :c:func:`Py_Finalize` call shuts the interpreter down, followed by
-the end of the program. In a real program, you may want to get the
-Python script from another source, perhaps a text-editor routine, a
-file, or a database. Getting the Python code from a file can better
-be done by using the :c:func:`PyRun_SimpleFile` function, which saves
-you the trouble of allocating memory space and loading the file
-contents.
+The :c:func:`Py_SetProgramName` function should be called before
+:c:func:`Py_Initialize` to inform the interpreter about paths to Python run-time
+libraries. Next, the Python interpreter is initialized with
+:c:func:`Py_Initialize`, followed by the execution of a hard-coded Python script
+that prints the date and time. Afterwards, the :c:func:`Py_Finalize` call shuts
+the interpreter down, followed by the end of the program. In a real program,
+you may want to get the Python script from another source, perhaps a text-editor
+routine, a file, or a database. Getting the Python code from a file can better
+be done by using the :c:func:`PyRun_SimpleFile` function, which saves you the
+trouble of allocating memory space and loading the file contents.
.. _lower-level-embedding: