How can I in C # import, that is, execute some script in another language (Python)?
Example:
If you write "R" in a program in C #, it executes a file named ApertouR.py
.
How can I in C # import, that is, execute some script in another language (Python)?
Example:
If you write "R" in a program in C #, it executes a file named ApertouR.py
.
You have Python.NET and should be the most appropriate one. In some cases you can use IronPython . This way both languages can work on the same platform and coexist.
There are other ways, but I think a lot of gambiarra. One is to call the interpreter externally as a normal application. Too much can go wrong in this. It is a valid option, but it is not the most reliable.
It would be good to think if you even need this if you do not have a better solution. We can not help much more because the question does not tell the scenario where it will be used. You may not even need Python.
You can make a system call
Process.start(@"python C:\ApertouR.py")
But I do not know what kind of application this is.