I have a function that prints to an output file
def drawfile(m):
findcovers(m)
i = 1
for x in m.intervalm:
print("===="+str(i)+"====", file = output)
print(configtostr(x.config), file = output)
print("covered by:" + listtostr(x.parents,"+"), file = output)
print("covers:" + listtostr(x.children,"-"), file = output)
drawf(x)
i = i + 1
I've run the same script twice and both times the output file stops after printing print(configtostr(x.config), file = output)
without printing the next line print("covered by:" + listtostr(x.parents,"+"), file = output)
, both times at the same entry in m.intervalm
.
For reference
def listtostr(l,string=" "):
result = string
for x in l:
result += (str(x) + string)
return result
is a pretty simple function that I don't think is looping infinitely. The script does continue to compute several more long computations after printing this file, so I looked into print buffering. But I don't think this is happening since it's been 48 hours and the output file is still not updated, and there is a lot more that should be printing. I know from what has already been printed that the later entries of m.intervalm
have been computed. Python hasn't given me any errors either.
I'm pretty stuck, and would appreciate any insight/help. Thanks in advance!