Tuesday, May 6, 2008

Be a blogger...

I hasten to add a few words to my Blog when I discovered something, so as to be a blogger...

In the coding morning, I ran into one strange problem which kept me scratch hair for an hour...



file = 'tmp.ode'
fout = open(file,'w')
... (write goodies) ...
fout.write('done\n')
subprocess.Popen(['xppaut %s -silent > out 2>err' % file], shell=True).wait()




Obviously I forgot to close the output file object. For me, this has the peculiar effect of disturbing the following system call: the xppaut interpreter simply refused to read the ODE file, which I have found to be readily there on the directory, and contents are all correct.

No comments: