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

# Module utils

source code

Classes
| IdCounter

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

Imports: codecs, os, TimelineIOError

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 file.