C# 调用批python 脚本
来源:互联网 发布:医疗竞价数据分析 编辑:程序博客网 时间:2024/05/17 17:55
1.加命名空间
using System.Diagnostics;
2.实现例子
try
...{
string myDocumentsPath = AppDomain.CurrentDomain.RelativeSearchPath;
myProcess.StartInfo.FileName =myDocumentsPath+ /views.py; //指定python文件
myProcess.StartInfo.Arguments = picname + " " + style; //带参数
myProcess.StartInfo.CreateNoWindow =true;
myProcess.StartInfo.UseShellExecute = false;
myProcess.Start(); //启动
//
myProcess.WaitForExit();
// Label1.Text = "Python script is successfully executed!";
}
catch (Exception er)
...{
Label1.Text = er.ToString();
}
...{
string myDocumentsPath = AppDomain.CurrentDomain.RelativeSearchPath;
myProcess.StartInfo.FileName =myDocumentsPath+ /views.py; //指定python文件
myProcess.StartInfo.Arguments = picname + " " + style; //带参数
myProcess.StartInfo.CreateNoWindow =true;
myProcess.StartInfo.UseShellExecute = false;
myProcess.Start(); //启动
//
myProcess.WaitForExit();
// Label1.Text = "Python script is successfully executed!";
}
catch (Exception er)
...{
Label1.Text = er.ToString();
}
- C# 调用批python 脚本
- C# 调用 python脚本
- C#调用python脚本
- C#调用Python脚本的简单示例
- 【转】C#中调用python脚本
- C#调用Python脚本的简单示例,IronPython(转载)
- C#调用Perl脚本
- c#后台调用脚本
- c#调用matlab脚本
- Python 调用shell脚本
- python调用Shell脚本
- python调用Shell脚本
- python调用shell脚本
- c++调用python脚本
- Java调用Python脚本
- bat脚本调用python
- python调用shell脚本
- Java调用Python脚本
- 关于用.Net平台开发SPMS_API开发接口(青牛软件 SPInterface.dll) 里的PChar说明
- Designing ActiveX Components with the MFC Document/View Model
- DataBinding(一)
- web.xml规则经过整理总结如下
- ASP.NET常用技巧
- C# 调用批python 脚本
- 那就推荐一本消遣书吧
- jsp下拉列表数据初始化,以及字符串比较
- Firefox3/4的技术突破 显卡渲染网页
- ASP.NET常用技巧网站
- kaishi
- web.xml配置的详细说明
- 與領導喝酒的18招決窍
- Solaris的历史和现在