File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ Embedding Python in .NET
50
50
(internal, derived from ``MissingMethodException ``) upon calling ``Initialize ``.
51
51
Typical values are ``python38.dll `` (Windows), ``libpython3.8.dylib `` (Mac),
52
52
``libpython3.8.so `` (most other Unix-like operating systems).
53
+ - Then call ``PythonEngine.Initialize() ``. If you plan to use Python objects from
54
+ multiple threads, also call ``PythonEngine.BeginAllowThreads() ``.
53
55
- All calls to python should be inside a
54
56
``using (Py.GIL()) {/* Your code here */} `` block.
55
57
- Import python modules using ``dynamic mod = Py.Import("mod") ``, then
Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ integrate Python engine and use Python libraries.
8
8
(internal, derived from ` MissingMethodException ` ) upon calling ` Initialize ` .
9
9
Typical values are ` python38.dll ` (Windows), ` libpython3.8.dylib ` (Mac),
10
10
` libpython3.8.so ` (most other * nix). Full path may be required.
11
+ - Then call ` PythonEngine.Initialize() ` . If you plan to [ use Python objects from
12
+ multiple threads] ( https://github.com/pythonnet/pythonnet/wiki/Threading ) ,
13
+ also call ` PythonEngine.BeginAllowThreads() ` .
11
14
- All calls to Python should be inside a
12
15
` using (Py.GIL()) {/* Your code here */} ` block.
13
16
- Import python modules using ` dynamic mod = Py.Import("mod") ` , then
You can’t perform that action at this time.
0 commit comments