Subprocess module in Python to cmd.exe
<p>I have some code here trying to open up the <code>cmd.exe</code> from Python and input some lines for the command to use.</p>

<p>Here it is:</p>

<pre><code>PDF= "myPDF"
output= "my output TIF"

def my_subprocess(command,c='C:\here'):
     process = subprocess.Popen(command,stdout=subprocess.PIPE,shell=True,cwd=c)
     communicate = process.communicate()[0].strip()      

my_subprocess('"cmd.exe" &amp;&amp; "C:\\here\\myinfamous.bat" &amp;&amp; "C:\\my directory and lines telling cmd to do stuff"'+ PDF + " " + output)
</code></pre>

<p>When run with the rest of my script, the command prompt does not even open up and there seems to be no output or errors at all. My thought is that it has not even run the <code>cmd.exe</code> command so none of this code is going in to create the final output.</p>

<p>Is there something I am not doing properly?</p>

<p>Thank you.</p>