WinForms C#使用批处理文件 [英] winforms c# using batch files
本文介绍了WinForms C#使用批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图用c#编写Windows窗体应用程序,该应用程序必须在python中调用预写的脚本.当前使用批处理文件访问这些脚本.我需要将这些连接到Windows窗体,并捕获python脚本的输出,并将一些参数写回去.我目前正在使用C#2010 Express.任何想法/方法将不胜感激.
问候,
Varun
Hi,
I am attempting to write a windows forms application in c# which has to call prewritten scripts in python. These scripts are currently accessed using batch files. I need to connect these up to a windows form and capture the output of the python script and write back some parameters to it. I am currently using C# 2010 Express. Any ideas/methods will be highly appreciated.
Regards,
Varun
推荐答案
查看流程类 [^ ]
您必须设置流程对象以等待退出并捕获stdout和stderr. Google是您的朋友.
You have to set your process object to wait for exit and to capture stdout and stderr. Google is your friend.
这篇关于WinForms C#使用批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文