From: Ezio Melotti Date: Fri, 22 Feb 2013 05:38:11 +0000 (+0200) Subject: #17256: fix syntax highlight in embedding example. Patch by Kushal Das. X-Git-Tag: v2.7.4rc1~89 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=986f71cb2ddb909176f72ab8ff10f9307468aba7;p=thirdparty%2FPython%2Fcpython.git #17256: fix syntax highlight in embedding example. Patch by Kushal Das. --- diff --git a/Doc/extending/embedding.rst b/Doc/extending/embedding.rst index ed2b5bf3e455..44beabf16402 100644 --- a/Doc/extending/embedding.rst +++ b/Doc/extending/embedding.rst @@ -229,7 +229,9 @@ following two statements directly after :c:func:`Py_Initialize`:: These two lines initialize the ``numargs`` variable, and make the :func:`emb.numargs` function accessible to the embedded Python interpreter. -With these extensions, the Python script can do things like :: +With these extensions, the Python script can do things like + +.. code-block:: python import emb print "Number of arguments", emb.numargs() @@ -273,7 +275,9 @@ the linker not to remove these symbols. Determining the right options to use for any given platform can be quite difficult, but fortunately the Python configuration already has those values. To retrieve them from an installed Python interpreter, start an interactive -interpreter and have a short session like this:: +interpreter and have a short session like this + +.. code-block:: python >>> import distutils.sysconfig >>> distutils.sysconfig.get_config_var('LINKFORSHARED')