C#调用Python

时间:2014-03-31 15:29:56   收藏:0   阅读:606

Cursor.Current = Cursors.WaitCursor;

Process process = new Process();

//不显示 console 窗口
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = true;

process.StartInfo.FileName = @"C:\Python27\Python.exe";
process.StartInfo.WorkingDirectory = get_app_path();
process.StartInfo.Arguments = get_app_path() + "parser.py";
process.Start();

process.WaitForExit();
Cursor.Current = Cursors.Default;

C#调用Python,布布扣,bubuko.com

原文:http://www.cnblogs.com/zeroone/p/3632364.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!