diff --git a/README.rst b/README.rst index f2907f43a..a8e651890 100644 --- a/README.rst +++ b/README.rst @@ -85,6 +85,9 @@ Example static void Main(string[] args) { + // The Python library can also be set with the `PYTHONNET_PYDLL` env var + // or dynamically with a library like https://github.com/losttech/WhichPython + Runtime.PythonDLL = "python38.dll"; PythonEngine.Initialize(); using (Py.GIL()) { diff --git a/doc/source/dotnet.rst b/doc/source/dotnet.rst index ed2b741a7..f657c1261 100644 --- a/doc/source/dotnet.rst +++ b/doc/source/dotnet.rst @@ -16,6 +16,8 @@ At a very high level, to embed Python in your application one will need to: - Reference ``Python.Runtime.dll`` (e.g. via a ``PackageReference``) +- Set the Python library the code should run with via the ``Runtime.PythonDLL`` + property or the ``PYTHONNET_PYDLL`` environment variable - Call ``PythonEngine.Initialize()`` to initialize Python - Call ``var mod = PyModule.Import(name)`` to import a module as ``mod`` pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy