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

Popular posts from this blog

周末发现的两样东西,和心理有关的。

QStringList related performance