'StandardOut has not been redirected or the process hasn't started yet.'
private void button1_Click(object sender, EventArgs e)
{
output = process.StandardOutput.ReadToEndAsync().ToString();
errors = process.StandardError.ReadToEndAsync().ToString();
richTextBox2.AppendText(errors);
richTextBox2.AppendText(output);
}
System.Threading.Tasks.Task`1[System.String]System.Threading.Tasks.Task`1[System.String]
singleton
var exited = process.WaitForExit(0);
TechLog.AppendText(exited.ToString());
time.sleep(5)
print("1 Sleep")
time.sleep(5)
print("2 Sleep")
time.sleep(5)
print("3 Sleep")
time.sleep(5)
print("4 Sleep")
time.sleep(5)
print("5 Sleep")
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = @"C:/Python/Python38-32/python.exe";
var PyScript = @"Load.py";
psi.UseShellExecute = false;
psi.CreateNoWindow = true;
psi.RedirectStandardOutput = true;
psi.RedirectStandardError = true;
var errors = "";
var output = "";
psi.Arguments = $"\"{PyScript}\" \"{URIForSaveTicks}\" \"{SymbolForLoad}\" \"{YearFrom}\" \"{MonthFrom}\" \"{DayFrom}\" \"{HoursFrom}\" \"{MinutesFrom}\" \"{SecondsFrom}\" \"{msFrom}\" \"{YearTo}\" \"{MonthTo}\" \"{DayTo}\" \"{HoursTo}\" \"{MinutesTo}\" \"{SecondsTo}\" \"{FromFullOneString}\"";
using (var process = Process.Start(psi))
{
errors = process.StandardError.ReadToEnd();
output = process.StandardOutput.ReadToEnd();
}
а вам типа в падлу в лом