File tree Expand file tree Collapse file tree 2 files changed +21
-6
lines changed
Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,6 @@ provides a powerful application scripting tool for .NET developers. It
1717allows Python code to interact with the CLR, and may also be used to
1818embed 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-
2520Calling .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
Original file line number Diff line number Diff 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
100101Constructing a ``Runtime `` instance
101102...................................
You can’t perform that action at this time.
0 commit comments