Roshan B Vishwakarma
Roshan B Vishwakarma

Reputation: 99

How to Create a python Dll file that should be used in C#.net?

I have to create a win32 python dll file which can used in C#.Net code. And access the classes & functions present in the dll file through C#. Is there any way to create a win32 python dll?

Please help me out....

Upvotes: 2

Views: 6531

Answers (3)

Jeff Hardy
Jeff Hardy

Reputation: 7662

You can compile your Python sources to a DLL with pyc.py, in the Samples directory of IronPython. However, you can't load this DLL from C# directly - you'll still need to host IronPython, but then you can reference the DLL with the IronPython engine and import from it.

Upvotes: 1

skrat
skrat

Reputation: 5562

You don't need any DLL, you just need to load your Python sources using IronPython

Upvotes: 0

Adam
Adam

Reputation: 2334

Try do some investigation about Pyrex. I'm not sure if it will solve your issue, but at least I seen that some guys was trying to get it working.

Upvotes: 0

Related Questions