Redirecting stdin and stdout in .Net
问题 I'm trying to redirect stdin and stdout of a console application, so that I can interact with them via F#. However, depending on the console application the obvious code seems to fail. The following F# code works for dir but fails (hangs) for python and fsi : open System open System.Diagnostics let f = new Process() f.StartInfo.FileName <- "python" f.StartInfo.UseShellExecute <- false f.StartInfo.RedirectStandardError <- true f.StartInfo.RedirectStandardInput <- true f.StartInfo