I am trying to run a script from python subprocess.
subprocess.call('set APPID=Testforscannedpdf',shell=True)
subprocess.call('set PWD=XXXXXXXXXXXX',shell=True)
subprocess.call('C:\\Users\\AppData\\Local\\Continuum\\anaconda3\\python.exe C:\\Users\\Desktop\\Parsing\\COF.pdf C:\\Users\\Desktop\\Parsing\\pdf_conv.py C:\\Users\\Desktop\\Parsing\\out\\outputs.txt',shell=True)
When I run it directly on Anaconda Prompt/command prompt I am able to run it. But when I am trying run it through subprocess I am unable to get the output. It always gives output as 1.
I know the error is in the 3rd 'subprocess.call' statement because of the spaces between arguments. But I unable to find a fix for it. I also tried passing the arguments in a list in 'subprocess.Popen' but no results again.
Please help. Thanks in advance!