private void Execute(){ Process proc = new Process(); proc.StartInfo.WorkingDirectory = @"C:\scripts"; proc.StartInfo.FileName = "python.exe"; proc.StartInfo.Arguments = "foo.py"; proc.StartInfo.UseShellExecute = false; proc.StartInfo.RedirectStandardOutput = false; proc.StartInfo.RedirectStandardError = true; proc.Start(); proc.WaitForExit(); proc.Close()}
Copyright © 2006-2008 Corey Goldberg
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.