Hi I am quite new to Python and I am trying to call a subprocess from another Python Script using subprocess.call. But my arguments are variable names. So, should I use subprocess.call or subprocess.popen ?
I want to execute the following command from another python script:
python npp.python -i fname -o fname+"out" -l fname+"log" -e excplist -i ignorelist
So, should I do
subprocess.Popen(['python', 'npp.python', '-i', fname , 'o', fname+"out", '-l', fname+"log", '-e', excplist,'-i',ignrlist]).communicate()
I am not able to call the other program by doing so. Any suggestions on what I am doing wrong ?