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

Skip to content

Commit 3c4dd16

Browse files
committed
Update README
1 parent 80adda9 commit 3c4dd16

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

README.rst

+19-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ provides a powerful application scripting tool for .NET developers. It
1717
allows Python code to interact with the CLR, and may also be used to
1818
embed Python into a .NET application.
1919

20-
.. note::
21-
The master branch of this repository tracks the ongoing development of version 3.0.
22-
Backports of patches to 2.5 are tracked in the
23-
`backports-2.5 branch <https://github.com/pythonnet/pythonnet/tree/backports-2.5>`_.
24-
2520
Calling .NET code from Python
2621
-----------------------------
2722

@@ -42,6 +37,25 @@ module:
4237
clr.AddReference("System.Windows.Forms")
4338
from System.Windows.Forms import Form
4439
40+
By default, Mono will be used on Linux and macOS, .NET Framework on Windows. For
41+
details on the loading of different runtimes, please refer to the documentation.
42+
43+
.NET Core
44+
~~~~~~~~~
45+
46+
If .NET Core is installed in a default location or the ``dotnet`` CLI tool is on
47+
the ``PATH``, loading it instead of the default (Mono/.NET Framework) runtime
48+
just requires setting either the environment variable
49+
``PYTHONNET_RUNTIME=coreclr`` or calling ``pythonnet.load`` explicitly:
50+
51+
.. code-block:: python
52+
53+
from pythonnet import load
54+
load("coreclr")
55+
56+
import clr
57+
58+
4559
Embedding Python in .NET
4660
------------------------
4761

doc/source/python.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ The equivalent configuration to the ``load`` example would be
9595
PYTHONNET_CORECLR_RUNTIME_CONFIG=/path/to/runtimeconfig.json
9696
9797
.. note::
98-
Only string parameters are supported this way.
98+
Only string parameters are supported this way. It has the advantage, though,
99+
that the same configuration will be used for subprocesses as well.
99100

100101
Constructing a ``Runtime`` instance
101102
...................................

0 commit comments

Comments
 (0)