[Python-ideas] BackupFile

Sturla Molden sturla at molden.no
Fri Jun 29 18:59:23 CEST 2012

On 25.06.2012 14:17, Kim Gräsman wrote:

 > I came up with a mechanism that I thought might be useful
 > in the Python standard library -- a scope-bound self-restoring
 > backup file.

>  with Backup(settings_file):
>      rewrite_settings(settings_file)
>      do_something_else()

Are you reinventing the transactional database?

If you need atomic commit and rollback, I am sure you can find a 
database that will take care of that (even Sqlite if you look in 
Python's standard library).


More information about the Python-ideas mailing list