views:

534

answers:

2

Hello,

how can I load a c# dll in python?

Do I have to put some extra code in the c# files? (like export in c++ files)

I don't want to use IronPython. I want to import a module to Python!

+1  A: 

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 pythn guru, you'll feel more at home when u 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/

Visit here for a sample C# DLL which is visible to COM

Vivek Bernard
Now that I've saw Ironpython I understood what it was. I don't want that. I want to import a module in python :P
aF
You mean Import (port) C# code to Python or Import a C# dll to Python
Vivek Bernard
Import and use functions from a C# Dll in Python
aF
See if this helpshttp://www.wiredfool.com/2006/11/18/python-and-com-components/
Vivek Bernard
A: 

Check out http://pythonnet.sourceforge.net/. It may be what you want.

Mark Tolonen