If the file open commands are changed to use 'binary'
access instead of 'append', the files will always be upto
date. The 'print' statements will need to be replaced
with 'put' statements (which initiate a flush automatically
everytime they are called). Additionally, to
simulate 'append' functionality with 'binary', an
initial 'seek' statement (with 'filelen()' as one of the
argunments) will be needed to set the 'puts' to add to the
end of the file instead of overwriting the file. Its a long
solution, but it will insure that all data is always
written incase of abnormal program termination before a
flush can be initiated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
try a flush() call
red0x
Logged In: YES
user_id=279710
If the file open commands are changed to use 'binary'
access instead of 'append', the files will always be upto
date. The 'print' statements will need to be replaced
with 'put' statements (which initiate a flush automatically
everytime they are called). Additionally, to
simulate 'append' functionality with 'binary', an
initial 'seek' statement (with 'filelen()' as one of the
argunments) will be needed to set the 'puts' to add to the
end of the file instead of overwriting the file. Its a long
solution, but it will insure that all data is always
written incase of abnormal program termination before a
flush can be initiated.