简体   繁体   English

在VS2017中从C#调用Python函数

[英]Invoke Python functions from C# in VS2017

I am new to Python and currently I have a Python project under VS2017 solution along with a C# project. 我是Python的新手,目前我在VS2017解决方案下有一个Python项目以及一个C#项目。 I know the question has been asked before and the steps involved creating a process in C# and calling the Python.exe and pass in the *.pr file. 我知道这个问题已经被问过了,这些步骤涉及在C#中创建一个进程并调用Python.exe并传递* .pr文件。 However, with VS2017 and the integrated Python environment, I want to know if the process of invoking/calling Python functions has been changed/improved? 但是,借助VS2017和集成的Python环境,我想知道是否已更改/改进了调用/调用Python函数的过程? Does it still require me to have Python installed on the server and physically point the location of the Python.exe? 是否仍然需要我在服务器上安装Python并实际指向Python.exe的位置?

I cannot and will not use IronPython as it is running the dead 2.7 base and I want to use Python 3.6 going forward. 我不能也不会使用IronPython,因为它正在运行已失效的2.7基础,而我想继续使用Python 3.6。

Thank you for any pointers! 谢谢您的指点!

No, it's still the same. 不,还是一样。 Starting a process is a feature of the .NET language (code) and has nothing to do with Visual Studio. 启动进程是.NET语言(代码)的功能,与Visual Studio没有任何关系。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM