Executing Python Script from C#
<p>I am trying to execute the python script from C# in the following way:</p>

<pre><code>int ExitCode;
ProcessStartInfo ProcessInfo;
Process Process;

ProcessInfo = new ProcessStartInfo();
ProcessInfo.FileName = "C:\Python27\python.exe";
ProcessInfo.Arguments = "C:\generate.py book1.pdf";
ProcessInfo.CreateNoWindow = true;
ProcessInfo.UseShellExecute = false;
ProcessInfo.RedirectStandardOutput = true;

Process = Process.Start(ProcessInfo);
Process.WaitForExit();
ExitCode = Process.ExitCode;
Process.Close();
</code></pre>

<p>When I execute this on the server, I get the ExitCode as 1. But the same code is working fine locally.</p>

<p>Also when I run this command from the cmd prompt, the python script executes without any issues.</p>

<p>This python script is actually being used to convert the PDF pages to SWF files, extract the text from pages and create thumbnail of the pdg pages using various open sources.</p>

<p>Can anyone please help me understand what could be the issue with above C# code or do I need to set any permissions on the server?</p>

<p>Thanks in advance,</p>
