Package Gnumed :: Package timelinelib :: Package db :: Module utils
[frames] | no frames]

Module utils

source code

Functions
 
safe_write(path, encoding, write_fn)
Write to path in such a way that the contents of path is only modified correctly or not modified at all.
source code
 
create_non_exising_path(base, suffix) source code
 
safe_locking(controller, edit_function, exception_handler=None) source code

Imports: codecs, os, TimelineIOError, register_unlock_function, to_unicode


Function Details

safe_write(path, encoding, write_fn)

source code 

Write to path in such a way that the contents of path is only modified correctly or not modified at all.

In some extremely rare cases the contents of path might be incorrect, but in those cases the correct content is always present in another dbfile.