python: file.writelines()
writelines() won't flush automatically until you call flush() or close(), sometimes, close() are called by default by the system when deconstructing.
So, flush by yourself. Be sure to handle the case when close() was not properly called.
Comments
Post a Comment