stdin.write()被阻止与foil.exe交互

时间:2015-09-09 13:29:07

标签: python stdin popen

我正在为Xfoil编写一个包装器,我的第一个命令命令集是:

xmllint --html --shell --format table.log <<< "cat //table/tr/th/td[1]/text()"

我正在与xfoil进行如下交互:

commands=[]

commands.append('plop\n')
commands.append('g,f\n')
commands.append('\n')
commands.append('load '+ afile+'\n')
commands.append('\n')
#commands.append('ppar\n');
#commands.append('n %g\n',n);
commands.append('\n')
commands.append('\n')
commands.append('oper\n')
commands.append('iter '+ str(iter) + '\n')
commands.append('visc {0:f}\n'.format(Re))
commands.append('m {0:f}\n'.format(M))

但是,Xfoil.stdin.write被阻止与程序交互 - xfoil.exe - 因为Xfoil.stdin.write(i)返回None。

这在第一个命令即 plop

之后立即发生

如何解决此问题?

0 个答案:

没有答案