Hi, I'm pretty new to Python, and I'm trying to call a subprocess from another Python Script using subprocess.call. But my arguments are variable names. So should one 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 cannot call another program by doing this. Any suggestions on what I'm doing wrong?
source share