How to load a C# dll in python?
The package Python for.NET and the Python Implementation IronPython now work the same way.
Example for a C# DLL MyDll.dll
:
import clr
clr.AddReference('MyDll')
from MyNamespace import MyClass
my_instance = MyClass()
See this post for more details.
This is to answer the second part of your Question Try making the DLL COM visible.
by using the
[ComVisible(true)]
Ok IronPython is a .net implemenatation of the Python language The technology is going to use the DLR of the .net 4.0 when it arrives so IronPython will have more Dynamism (is that a word). (In english if you're a Python guru, you'll feel more at home when you use IronPython)
So you may well choose IronPython, if you do that you can skip the COM visible part. Since both (C# , Iron Python) are under .Net
http://ironpython.net/
Python for .NET works well if you don't want to use IronPython.