I hit my head in the last two days trying to figure out if python module can be run in C #. The module that interests me is Sympy, which can be found here http://code.google.com/p/sympy/ (in case anyone is interested). This is a math library, and this one does what I need. I did not find a C # library that is just as good (I tested math.net and others ..)
From a google search, I found out that you can execute python code inside C # using IronPython. We did not find a real example of using the module with IronPython or with PythonNet.
Can someone tell me if it is possible to use the python module in C # and that it recommends IronPython or PythonNet. Also, if possible, does this mean that my APP will need the python compiler to be installed to work, or will the dll link suffice?
I don't know how well python lib will load in C #, but I will write my program through IronPython.
you can compile it in exe so that your users do not know the difference.
Now this is a hunch, but maybe you can upload your assembly to other C # projects and use it that way. i.e. wrap the python library with ironpython and then load this in c #
, , .
, , - :)
, python Anaconda3\Lib\site-packages pythonnet -:
static void Main(string[] args) { using (Py.GIL()) { dynamic foo = Py.Import("your_script_name"); } }
DLL . Iron Python, , Python 2.x , . IIS Python GIL, .
Source: https://habr.com/ru/post/1729957/More articles:can any unused object leave the garbage collector? - javaCan we increase the priority of the garbage collection thread in java - javaCan I use more than 65535 ports to implement XMPp PubSub or Comet? - cometGQL query with the like operator - google-app-engineCan we have an individual garbage collector in java? - javaDisk Partition Structure - javaDebugging WCF debugging - debuggingEditing local cookie values - securityTCP flow control in AS3? - flexOptions for designing links in the cache stream when evicting old records - c ++All Articles