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 ?
-on the-ooption. - Martijn Pieterssubprocess.callis basicallysubprocess.Popen, but it returns the exit code. Usesubprocess.Popen. Also, can you say what's going wrong? Why is the code not working? - kirbyfan64sosshthe python third module ? - Dreampuf