command = (
    'python npp.python -i {file} -o {file}.out -l {file}.log -e {excep} -i {ignore}'
    .format(file=pipe.quote(fname), excep=exceptlist, ignore=ignorelist))
subprocess.call(shlex.split(command))
Subprocess call with arguments as variables python