All,
I wrote a small python program to create a file which is used as an input file to run an external program called srce3d. Here it is:
fin = open('eff.pwr.template','r')
fout = open('eff.pwr','wr')
for line in fin:
if 'li' in line:
fout.write( line.replace('-2.000000E+00', `-15.0`) )
else:
fout.write(line)
fin.close
fout.close
os.chmod('eff.pwr',0744)
# call srce3d
os.system("srce3d -bat -pwr eff.pwr >& junk.out")
This does not work. The input file gets written properly but srce3d complains of an end of file during read. The os.system command works fine with a pre-existing file, without any need to open that file.
Thanks for your help