[Mono-list] Call C# mono from python linux?

Ryan Boggs rmboggs at gmail.com
Tue Mar 4 18:40:35 UTC 2014


Hi,

See inline..

> On Mar 4, 2014, at 8:22 AM, mickeyf <mickey at thesweetoasis.com> wrote:
> 
> I want to use some functionality of a mono class in python (I have very
> little experience in python). The examples I've found of using c# in python
> all start with:
> 
> /import clr/
> 
> This returns "No module named clr", and I suspect this is because the
> examples are from Windows .NET rather than mono running on linux
> specifically. 
The 'import clr' is specific to IronPython, which is a version of Python that runs on mono/.net. I don't recall if IronPython runs on Linux. I want to say it does but I don't want to get your hopes up if I am wrong but with that, you can access c# classes directly. Unfortunately, I don't think django will run well on IronPython. There was some attempts to get it going sometime ago but I don't think it went anywhere.
> 
> The c# will be integrated into a larger python program that already exists
> (django). It is not likely to be rewritten in some other variant. Is there a
> plain vanilla module to connect my c# mono with python?
> 
> Can someone point me in the right direction here? 
The only other thought I gave is to create an executable mono project that could talk to the class which could output the results in something that could be interpreted by Python. Like in a Json format or something like that.

Is it not possible to achieve the same (or similar) functionality that is contained in the c# class in question with a python class?

Hope this helps,
Ryan
> 
> Much thanks!
> 
> 
> 
> 
> --
> View this message in context: http://mono.1490590.n4.nabble.com/Call-C-mono-from-python-linux-tp4662120.html
> Sent from the Mono - General mailing list archive at Nabble.com.
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list


More information about the Mono-list mailing list