I am trying to pass a file to a program (MolPro) that I start as subprocess with Python.
It most commonly takes a file as argument, like this in console:
<
It seems like your second method should work if you remove StdinCommand from the Popen() arguments:
StdinCommand
Popen()
p = Popen(['/vol/thchem/x86_64-linux/bin/molpro'], shell = False, stdout = None, stderr = STDOUT, stdin = PIPE) p.communicate(input = StdinCommand)