Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ed71918

Browse files
committed
merge with 3.2
2 parents e2af509 + 4552e3f commit ed71918

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

Doc/extending/embedding.rst

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,16 @@ perform some operation on a file. ::
6666
return 0;
6767
}
6868

69-
Function :c:func:`Py_SetProgramName` should be called before
70-
:c:func:`Py_Initialize` to inform the interpreter about paths to
71-
Python run-time libraries. Next initialize the Python interpreter
72-
with :c:func:`Py_Initialize`, followed by the execution of a
73-
hard-coded Python script that prints the date and time. Afterwards,
74-
the :c:func:`Py_Finalize` call shuts the interpreter down, followed by
75-
the end of the program. In a real program, you may want to get the
76-
Python script from another source, perhaps a text-editor routine, a
77-
file, or a database. Getting the Python code from a file can better
78-
be done by using the :c:func:`PyRun_SimpleFile` function, which saves
79-
you the trouble of allocating memory space and loading the file
80-
contents.
69+
The :c:func:`Py_SetProgramName` function should be called before
70+
:c:func:`Py_Initialize` to inform the interpreter about paths to Python run-time
71+
libraries. Next, the Python interpreter is initialized with
72+
:c:func:`Py_Initialize`, followed by the execution of a hard-coded Python script
73+
that prints the date and time. Afterwards, the :c:func:`Py_Finalize` call shuts
74+
the interpreter down, followed by the end of the program. In a real program,
75+
you may want to get the Python script from another source, perhaps a text-editor
76+
routine, a file, or a database. Getting the Python code from a file can better
77+
be done by using the :c:func:`PyRun_SimpleFile` function, which saves you the
78+
trouble of allocating memory space and loading the file contents.
8179

8280

8381
.. _lower-level-embedding:

0 commit comments

Comments
 (0)