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

Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: Add different methods to reference Python DLL
  • Loading branch information
TheJanzap committed Aug 22, 2024
commit 2f69bd3adff08f370a8d622d84bee21f4fbb2c06
4 changes: 3 additions & 1 deletion doc/source/dotnet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ These classes include PyObject, PyList, PyDict, PyTuple, etc.
At a very high level, to embed Python in your application one will need
to:

- Reference ``Python.Runtime.dll`` (e.g. via a ``PackageReference``)
- Reference ``Python.Runtime.dll`` (e.g. via a ``PackageReference``,
the ``Runtime.PythonDLL`` property or the ``PYTHONNET_PYDLL``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong. The Runtime.PythonDLL and PYTHONNET_PYDLL reference libpython*.so/dylib or python*.dll.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I didn't know that there's a difference. But since it's now mandatory to reference a Python DLL, I think it's a good idea to mention it here. Maybe as a separate bullet point?

environment variable)
- Call ``PythonEngine.Initialize()`` to initialize Python
- Call ``var mod = PyModule.Import(name)`` to import a module as ``mod``

Expand Down