【发布时间】:2016-03-16 12:18:43
【问题描述】:
我正在尝试从 C# 运行 python 脚本
从外壳打开,但脚本不运行
我知道,因为它应该创建一个文件
我怎样才能运行这个过程?
Process p = new Process(); // create process (i.e., the python program
p.StartInfo.FileName = @"C:\Python27\python.exe";
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.UseShellExecute = false; // make sure we can read the output from stdout
p.StartInfo.Arguments = @"T:\barakr\360_3G_daily_report\2016.03.15\0615319253\powerlink_logs_mrg.py"; //PanelsDirectory[j] + "\\powerlink_logs_mrg.py"; // start the python program with two parameters
p.Start();
【问题讨论】:
标签: c# python python-2.7 process