def flush(self):
"""Ensure that the key's data is flushed to disk.
Quoting the _winreg documentation:
It is not necessary to call FlushKey() to change a key. Registry
changes are flushed to disk by the registry using its lazy flusher.
Registry changes are also flushed to disk at system shutdown.
Unlike CloseKey(), the FlushKey() method returns only when all the
data has been written to the registry. An application should only
call FlushKey() if it requires absolute certainty that registry
changes are on disk.
If you don't know whether a FlushKey() call is required, it
probably isn't.
"""
_winreg.FlushKey(self.hkey)
评论列表
文章目录