File tree 2 files changed +21
-6
lines changed
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
17
17
allows Python code to interact with the CLR, and may also be used to
18
18
embed Python into a .NET application.
19
19
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
-
25
20
Calling .NET code from Python
26
21
-----------------------------
27
22
@@ -42,6 +37,25 @@ module:
42
37
clr.AddReference(" System.Windows.Forms" )
43
38
from System.Windows.Forms import Form
44
39
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
+
45
59
Embedding Python in .NET
46
60
------------------------
47
61
Original file line number Diff line number Diff line change @@ -95,7 +95,8 @@ The equivalent configuration to the ``load`` example would be
95
95
PYTHONNET_CORECLR_RUNTIME_CONFIG=/path/to/runtimeconfig.json
96
96
97
97
.. 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.
99
100
100
101
Constructing a ``Runtime `` instance
101
102
...................................
You can’t perform that action at this time.
0 commit comments