Trying to call Python script in C#
<p>I'm making a mini Python IDE for fun. Why not. So I want to be able to call a python script from C# and right now I'm just testing a simple scenario. I know this is NOT how professional IDE's probably work.</p>

<pre><code>    private void Run_Click(object sender, EventArgs e)
    {
        run_cmd("C:/Python34/python.exe", "C:/Users/Alaseel/Desktop/test.py");
    }

    private void About_Click(object sender, EventArgs e)
    {
        // Open the about documentation
    }

    private void run_cmd(string cmd, string args)
    {
        ProcessStartInfo start = new ProcessStartInfo();
        start.FileName = "C:/Python34/python.exe";
        start.Arguments = string.Format("{0} {1}", cmd, args);
        start.UseShellExecute = false;
        start.RedirectStandardOutput = true;
        using (Process process = Process.Start(start))
        {
            using (StreamReader reader = process.StandardOutput)
            {
                string result = reader.ReadToEnd();
                Console.Write(result);
            }
        }
    }
</code></pre>

<p>Whenever I click the "run" button on the Windows Form app, it briefly runs the python.exe then closes. It does not actually run the file that I passed in. Am I doing something wrong?</p>

<p>PS: The run_cmd method is NOT mine. I looked up this issue previously on a thread and used their code. But I think I'm using the method wrong.</p>

<p>Any ideas? Thank you!</p>