File redirection is a shell feature but you're using Popen() without invoking mantra with a shell. So one way to do it is to form a command using some shell (eg. csh). However, that's needlessly inefficient in this case. Just use mantra's -f option. eg. app + verbosity + “ -f ” + ifdpath