I know swig
to export a wrapper for a C/C++
to python
.
Is there any such a tool to export a wrapper for a C#
DLL?
Asked
Active
Viewed 990 times
4
-
1You may want to look at IronPython which runs on top of te dlr/clr dependimg on what your python app uses you may be able to run it on IronPython instead then you can call any .net library – TimothyP Mar 22 '13 at 15:07
-
Unfortunately I'm stuck to `python 3.2`. Are there alternatives for python 3? – Razer Mar 29 '13 at 18:25
-
There's [Python for .NET](http://pythonnet.sourceforge.net), but it looks to be for 2.x only. – Mark Tolonen Mar 31 '13 at 06:08
-
This question might be a duplicate of http://stackoverflow.com/questions/7367976/calling-a-c-sharp-library-from-python. – Oliver Aug 13 '13 at 19:44
-
1You want to call a C# function from your Python 3.2 script? Might be able to create a C++/CLI bridge: create C++ DLL that you export to Python via SWIG; link your C++ DLL to CLR as explained. OR create a COM bridge: with pywin32 you can easily use COM objects from Python. You would create a COM wrapper in C# for your C# function. You should look at the source code for Python.NET to see how that project does it, or post on their forum. – Oliver Aug 13 '13 at 19:50