As a simple and easy answer for the others I tried to find.
The location of the dll variable must be added to the path variable. This can be done simply by importing sys and calling the method shown (the path should not include the dll file).
Then you can use your dll with Python for .NET (impot clr) by setting the link using the AddReference method. Then you dll are ready to go! Example:
import sys import clr sys.path.append(r"C:\Users\...") clr.AddReference("MyDll") from mynamespace import myclass x = myclass()
source share