更新时间:2022-12-21 10:24:04
您的python编译器可能未从标准输入中读取.测试它:创建一个包含两个命令的脚本文件,运行命令外壳,然后通过键入"python< MyScriptFile"将脚本传递到该文件中.如果它有效,至少您知道它确实从stdin中读取了!
如果不是,那么您可能是一个人...无法通过命令行参数提供此信息吗?
It is possible that your python compiler does not read from standard input. Test it: create a script file containing your two commands, run a command shell, and pipe your script into it by typing "python <MyScriptFile". If it works, at least you know it does read from stdin!
If it doesn''t, then you may be on your own... Can you not provide this info via command line arguments?
尝试将process.StartInfo.RedirectStandardOutput = false;
设置为true
并尝试再次.
Try settingprocess.StartInfo.RedirectStandardOutput = false;
totrue
and try again.